Skip to content

chore(db): upgrade bundled PostgreSQL 17 β†’ 18 (#96) - #225

Open
jakub-przepiora wants to merge 1 commit into
developfrom
chore/postgres-18
Open

chore(db): upgrade bundled PostgreSQL 17 β†’ 18 (#96)#225
jakub-przepiora wants to merge 1 commit into
developfrom
chore/postgres-18

Conversation

@jakub-przepiora

Copy link
Copy Markdown
Contributor

Closes #96 (image/config/docs scope β€” in-place data-migration runbook intentionally out of scope per request; fresh installs + dump/restore only).

Changes

  • docker-compose.yml: postgres:17-alpine β†’ postgres:18-alpine.
  • docker-compose.yml: data volume mount /var/lib/postgresql/data β†’ /var/lib/postgresql. The PG18 official image stores data in a major-version subdirectory and refuses to start against the old /…/data mount (docker-library/postgres#1259) β€” the tag bump alone is not enough.
  • README badge + docs/development.md bumped to PostgreSQL 18 (minimum supported stays 14+).
  • CHANGELOG entry incl. the existing-deployment note (dump on 17 β†’ restore into 18; a major version can't reuse the 17 data dir in place).

Verified end-to-end on a fresh PG18 stack

  • postgres:18.4-alpine boots with the logical-replication flags β†’ wal_level=logical βœ“
  • Full migration set + seeders + admin account run cleanly βœ“ (incl. [feat] Support engineering CAD attachments for parts, assemblies and productsΒ #179 engineering_documents)
  • PGDATA = /var/lib/postgresql/18/docker (new version subdir) βœ“
  • App-level immutable audit_logs intact βœ“ (audit immutability is app-level, not a DB trigger β€” unaffected by the PG version)

Out of scope (per request)

The in-place pg_upgrade runbook for migrating an existing 17 data volume. Existing deployments dump/restore into a fresh volume; the changed mount path is compatible with that.

πŸ€– Generated with claude-flow

- docker-compose: postgres:17-alpine -> postgres:18-alpine.
- docker-compose: move the data volume mount from /var/lib/postgresql/data
  to /var/lib/postgresql. The PG18 official image stores data in a
  major-version subdirectory and REFUSES to start against the old /…/data
  mount (docker-library/postgres#1259) β€” the tag bump alone is not enough.
- README + docs bumped to PostgreSQL 18 (minimum supported stays 14+).
- CHANGELOG note incl. the existing-deployment path: a major version can't
  reuse a 17 data dir in place β€” dump on 17, restore into 18.

Verified end-to-end on a fresh stack: postgres:18.4-alpine boots with the
logical-replication flags (wal_level=logical, slots/senders), the full
migration set + seeders + admin run cleanly, PGDATA lands at
/var/lib/postgresql/18/docker, and the app-level immutable audit_logs table
is intact. Per request, the in-place data-migration runbook (pg_upgrade)
is out of scope for this change (fresh installs + dump/restore only).
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

βš™οΈ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e0a10070-a3c7-4998-9a6c-d9a170b5358c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • πŸ” Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant