Skip to content

Upgrade postgresql to 14.21#75

Merged
kahoona77 merged 17 commits intodevelopfrom
feature/74-Upgrade14-21
Feb 26, 2026
Merged

Upgrade postgresql to 14.21#75
kahoona77 merged 17 commits intodevelopfrom
feature/74-Upgrade14-21

Conversation

@nfranzeck
Copy link
Contributor

Resolve #70
Resolve #72
Resolve #74

nfranzeck and others added 17 commits February 23, 2026 16:21
…ker.com/_/postgres)

Important Note: (for PostgreSQL 17 and below) Mount the data volume at /var/lib/postgresql/data and not at /var/lib/postgresql because mounts at the latter path WILL NOT PERSIST database data when the container is re-created. The Dockerfile that builds the image declares a volume at /var/lib/postgresql/data and if no data volume is mounted at that path then the container runtime will automatically create an anonymous volume that is not reused across container re-creations. Data will be written to the anonymous volume rather than your intended data volume and won't persist when the container is deleted and re-created.
Remove redundant Layers:
- ENV defined as already part of the official image
- VOLUME is already defined in official image

- RUN PGDATA is performed by entrypoint of official image
- introduce lock file to prevent multiple backups running in the same time
- create full backup for versions with old schema
- write backup file to local config instead of relying on absolute path
- use new PGDATA schema that will be introduced in Postgresql18
- use build args for easy version adjustments
- use modular migrations scripts that are called during initialization of the database within the entrypoint of postgresql or run them manually for minor upgrades
- use util functions from docker-entrypoint.sh
Copy link
Contributor

@kahoona77 kahoona77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kahoona77 kahoona77 merged commit 744c3e2 into develop Feb 26, 2026
1 check passed
@kahoona77 kahoona77 deleted the feature/74-Upgrade14-21 branch February 26, 2026 13:57
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.

Upgrade from version 14.18-3 to 14.20-2 fails Upgrade to latest base image security-fix CVE-2026-2006

2 participants