Skip to content

doc: How to statically compile PostgreSQL (for portablitiy) #4

Open
@coolaj86

Description

@coolaj86

Scripts

Short Answer

The maintainers and other community members of Postgres have been clear that they believe static Postgres is far more harmful than not, and are not willing to support static builds.

Retooling the entire make system to support static builds would most likely not be accepted, and is not feasible for most people to do.

Long Answer: Bundle Instead

You can vendor the needed libraries into the ./lib/ folder and then update their rpaths in order to achieve nearly the same effect as static linking - or at least much greater compatibility across systems.

This is not considered static, but may be considered portable or relocatable.

The instructions vary slightly by architecture:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions