Skip to content

[BUG] Postgres Docker Compose incompatible with Postgres 18+ due to data directory change #434

@MikMik1011

Description

@MikMik1011

What is the problem?

The provided Docker Compose configuration for Postgres is incompatible with Postgres 18 and newer. The issue occurs because Postgres 18 changed the default data directory inside the official Docker image. Previously, the data directory was located at /var/lib/postgresql/data, but starting with Postgres 18 it is now /var/lib/postgresql/.

Operating System

Linux

Architecture Version (x86, x64, arm, etc)

x64

Steps to reproduce

  1. Create or use the provided docker-compose.yml with the Postgres service
  2. Start the containers
  3. Observe that the Postgres container keeps restarting and fails to start

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions