Thanks to visit codestin.com
Credit goes to github.com

Skip to content

merged #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 506 commits into
base: master
Choose a base branch
from
Open

merged #2

wants to merge 506 commits into from

Conversation

asanchez75
Copy link
Owner

merged

docker-library-bot and others added 30 commits September 30, 2021 11:02
Adjust POSTGRES_HOST_AUTH_METHOD to automatically match configured password_encryption
This flag prevents custom .psqlrc files from interfering with the db init process
fix: Add --no-psqlrc to psql script invocations
Signed-off-by: daniel sutton <[email protected]>
Add missing contrib modules / pl extensions to alpine image
original code didn't respect libnss-wrapper at other locations
Narrow postgres apt key package scope
ardentperf and others added 30 commits January 9, 2025 09:56
#1303)

* Remove inaccurate references to corruption, remove SEGTERM suggestion, update information links to current docs. Postgres is carefully designed such that data is not corrupted on crashes or unclean shutdowns - the main tradeoff is that WAL replay is needed on startup. In practice, SIGTERM can cause unexpected long delays to shutdowns - often during maintenance windows - so best not to actively suggest this. The links back to official Postgres documentation seem sufficient.
Remove PostgreSQL 12 since it is end of life
* Unset NOTIFY_SOCKET when running the temporary server.

Postgres has native support for this notification socket and will write a `READY=1` message once it is ready and accepting connections. Unfortunately, the temporary server used by the `docker-entrypoint.sh` also sends a message on the socket, making it appear as though the container is ready and serving connections when it is not.
When we added these lines, we needed newer files than PostgreSQL had upstream, but the situation has changed and we were pinned to a specific commit from 2017 - the _oldest_ PostgreSQL release version has a file from 2020.
Update to 17.5, 16.9, 15.13, 14.18, 13.21
Add Alpine 3.22 (remove Alpine 3.20)
This is a pretty large breaking change, which is why this only makes the change in 18+ (which is currently in pre-release stages, and not due for GA until September, and pre-release `PGDATA` directories are officially *not supported* on the GA release anyhow).

Concretely, this changes `PGDATA` to `/var/lib/postgresql/MAJOR/docker`, which matches the pre-existing convention/standard of the `pg_ctlcluster`/`postgresql-common` set of commands, and frankly is what we should've done to begin with, in a classic case of Chesterton's Fence (https://en.wikipedia.org/wiki/Wikipedia:Chesterton%27s_fence).

This also changes the `VOLUME` to `/var/lib/postgresql`, which should be more reasonable, and make the upgrade constraints more obvious.

For any users who have been testing the pre-releases, the simplest way to keep your existing data directory is going to be to add `PGDATA=/var/lib/postgresql/data` as an environment variable on your container or adjust your bind-mount from `/var/lib/postgresql/data` to `/var/lib/postgresql/18/docker`, but the *best* way is going to be to refactor your host directory such that your data lives at `18/docker` inside and you can then mount directly to `/var/lib/postgresql` (possibly setting `PGDATA=/var/lib/postgresql/MAJOR/docker` as well, if you want to go overboard on being explicit).
Change `PGDATA` in 18+ to `/var/lib/postgresql/MAJOR/docker`
See:

- https://salsa.debian.org/postgresql/postgresql/-/commit/eaa9529d8ecb0beaeebeb5b09362dbdf4ce34c0c
  "Make LLVM architectures a inclusion list so it works in the Architecture field."
  (which removes i386, notably)

- https://salsa.debian.org/postgresql/postgresql/-/commit/1d6f624592d18d0cb0d694675037984f0d44b5ae
  "Disable JIT on loong64 and riscv64 again, still segfaulting."
Only install 18+ JIT package on architectures where it's supported
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.