Skip to content

chore(deps): bump library/postgres from 16-alpine to 18-alpine#1

Merged
rustydb merged 1 commit intomainfrom
dependabot/docker_compose/library/postgres-18-alpine
Apr 3, 2026
Merged

chore(deps): bump library/postgres from 16-alpine to 18-alpine#1
rustydb merged 1 commit intomainfrom
dependabot/docker_compose/library/postgres-18-alpine

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot bot commented on behalf of github Mar 30, 2026

Bumps library/postgres from 16-alpine to 18-alpine.

@dependabot dependabot bot added dependencies Pull requests that update a dependency file docker_compose Pull requests that update docker_compose code labels Mar 30, 2026
@rustydb
Copy link
Copy Markdown
Owner

rustydb commented Mar 31, 2026

@dependabot recreate

@dependabot dependabot bot force-pushed the dependabot/docker_compose/library/postgres-18-alpine branch 2 times, most recently from 468e0f8 to ce26fb5 Compare March 31, 2026 20:39
@rustydb
Copy link
Copy Markdown
Owner

rustydb commented Apr 1, 2026

This is a significant jump, and I need to verify compatibility.

@rustydb
Copy link
Copy Markdown
Owner

rustydb commented Apr 1, 2026

It validated in GCP, but I don't know what that necessarily entails.
Checking out the dev instance.

@rustydb
Copy link
Copy Markdown
Owner

rustydb commented Apr 1, 2026

Fails validation locally.

postgres logs:

Error: in 18+, these Docker images are configured to store database data in a
       format which is compatible with "pg_ctlcluster" (specifically, using
       major-version-specific directory names).  This better reflects how
       PostgreSQL itself works, and how upgrades are to be performed.

       See also https://github.com/docker-library/postgres/pull/1259

       Counter to that, there appears to be PostgreSQL data in:
         /var/lib/postgresql/data

       This is usually the result of upgrading the Docker image without
       upgrading the underlying database using "pg_upgrade" (which requires both
       versions).

       The suggested container configuration for 18+ is to place a single mount
       at /var/lib/postgresql which will then place PostgreSQL data in a
       subdirectory, allowing usage of "pg_upgrade --link" without mount point
       boundary issues.

       See https://github.com/docker-library/postgres/issues/37 for a (long)
       discussion around this process, and suggestions for how to do so.
Error: in 18+, these Docker images are configured to store database data in a
       format which is compatible with "pg_ctlcluster" (specifically, using
       major-version-specific directory names).  This better reflects how
       PostgreSQL itself works, and how upgrades are to be performed.

       See also https://github.com/docker-library/postgres/pull/1259

       Counter to that, there appears to be PostgreSQL data in:
         /var/lib/postgresql/data

       This is usually the result of upgrading the Docker image without
       upgrading the underlying database using "pg_upgrade" (which requires both
       versions).

       The suggested container configuration for 18+ is to place a single mount
       at /var/lib/postgresql which will then place PostgreSQL data in a
       subdirectory, allowing usage of "pg_upgrade --link" without mount point
       boundary issues.

       See https://github.com/docker-library/postgres/issues/37 for a (long)
       discussion around this process, and suggestions for how to do so.
Error: in 18+, these Docker images are configured to store database data in a
       format which is compatible with "pg_ctlcluster" (specifically, using
       major-version-specific directory names).  This better reflects how
       PostgreSQL itself works, and how upgrades are to be performed.

       See also https://github.com/docker-library/postgres/pull/1259

       Counter to that, there appears to be PostgreSQL data in:
         /var/lib/postgresql/data

       This is usually the result of upgrading the Docker image without
       upgrading the underlying database using "pg_upgrade" (which requires both
       versions).

       The suggested container configuration for 18+ is to place a single mount
       at /var/lib/postgresql which will then place PostgreSQL data in a
       subdirectory, allowing usage of "pg_upgrade --link" without mount point
       boundary issues.

       See https://github.com/docker-library/postgres/issues/37 for a (long)
       discussion around this process, and suggestions for how to do so.

@rustydb
Copy link
Copy Markdown
Owner

rustydb commented Apr 1, 2026

Since the DB is running in Cloud SQL, the upgrade is automatically handled by GCP. The local dev stack is hitting issues as previously stated, but that's a non-issue as we can delete and recreate the database.

Confirmed that the dev stack works on pg18 on a rebased branch.

@dependabot rebase

Bumps library/postgres from 16-alpine to 18-alpine.

---
updated-dependencies:
- dependency-name: library/postgres
  dependency-version: 18-alpine
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/docker_compose/library/postgres-18-alpine branch from ce26fb5 to cca0f02 Compare April 1, 2026 15:51
@rustydb
Copy link
Copy Markdown
Owner

rustydb commented Apr 1, 2026

I will test the upgrade on a cloned version of our database in Cloud SQL before approving and merging.

@rustydb
Copy link
Copy Markdown
Owner

rustydb commented Apr 3, 2026

This won't affect production, so we can merge it and upgrade production during an opportune time.

@rustydb rustydb merged commit 8ec4ab0 into main Apr 3, 2026
9 checks passed
@rustydb rustydb deleted the dependabot/docker_compose/library/postgres-18-alpine branch April 3, 2026 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file docker_compose Pull requests that update docker_compose code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant