Skip to content

Fix PGDATA path to make postgres data durable (fixes #14358)#14362

Merged
Maffooch merged 3 commits intoDefectDojo:bugfixfrom
valentijnscholten:fix-pgdata-14358
Feb 23, 2026
Merged

Fix PGDATA path to make postgres data durable (fixes #14358)#14362
Maffooch merged 3 commits intoDefectDojo:bugfixfrom
valentijnscholten:fix-pgdata-14358

Conversation

@valentijnscholten
Copy link
Member

Summary

)

PostgreSQL 18 changed the default PGDATA path from /var/lib/postgresql/data
to /var/lib/postgresql/18/docker. The volume was mounted at the old path,
so data was stored in the container's ephemeral layer instead. Setting
PGDATA explicitly ensures data persists in the volume.
@valentijnscholten valentijnscholten added this to the 2.55.4 milestone Feb 21, 2026
@valentijnscholten valentijnscholten changed the title Fix database data loss after docker compose down (fixes #14358) Fix PGDATA path to make postgress data durable (fixes #14358) Feb 22, 2026
@valentijnscholten valentijnscholten changed the title Fix PGDATA path to make postgress data durable (fixes #14358) Fix PGDATA path to make postgres data durable (fixes #14358) Feb 22, 2026
@mtesauro
Copy link
Contributor

I saw that issue come in and wondered what changed.

Thanks for chasing that down @valentijnscholten

Copy link
Contributor

@mtesauro mtesauro left a comment

Choose a reason for hiding this comment

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

Approved

PostgreSQL 18 changed its default PGDATA path, causing data to be
written to the container's ephemeral layer instead of the Docker volume.
@github-actions github-actions bot added the docs label Feb 22, 2026
@Maffooch Maffooch merged commit 9147099 into DefectDojo:bugfix Feb 23, 2026
149 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants