# A1 — what the postgres images declare (9202, 2026-09-25T10:20:36Z)
## postgres:16-alpine
digest=postgres@sha256:721873c34ceb9f8d8fc265984940dc982404c105f19ad51be9fdc5970a6080ea PGDATA/ENV=PG_MAJOR=16 PG_VERSION=16.15 PG_SHA256=c1575341fa7bd40f5274ea465b34390f4dc64cdd0770af327005caaeb9f6b7ed PGDATA=/var/lib/postgresql/data  VOLUME={"/var/lib/postgresql/data":{}}
## postgres:17-alpine
digest=postgres@sha256:b0f9560a2de083e2cc7382e75f808c7381a32852a7ec49117deedb300e552b24 PGDATA/ENV=PG_MAJOR=17 PG_VERSION=17.11 PG_SHA256=dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979 PGDATA=/var/lib/postgresql/data  VOLUME={"/var/lib/postgresql/data":{}}
## postgres:18-alpine
digest=postgres@sha256:77f585114c32fbca283dc835b0596f4e52b51b4c6662d7810b2f4084f60a1873 PGDATA/ENV=PG_MAJOR=18 PG_VERSION=18.6 PG_SHA256=555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f PGDATA=/var/lib/postgresql/18/docker  VOLUME={"/var/lib/postgresql":{}}

# A1b — postgres:18-alpine with an EMPTY volume at /var/lib/postgresql/data (the templates' mount)
state: exited exit=1
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 (unused mount/volume)

       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.

# A1c — control: postgres:18-alpine with an empty volume at /var/lib/postgresql (its own layout)
state: running
2026-09-25 10:21:17.475 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2026-09-25 10:21:17.488 UTC [66] LOG:  database system was shut down at 2026-09-25 10:21:17 UTC
2026-09-25 10:21:17.496 UTC [1] LOG:  database system is ready to accept connections
18
