docker-library / postgres

Docker Official Image packaging for Postgres
http://www.postgresql.org
MIT License
2.14k stars 1.11k forks source link

postgres:alpine: error column datlastsysoid does not exist #1134

Closed MrWildanMD closed 9 months ago

MrWildanMD commented 9 months ago

i got this strange error on macOS but its running fine in my linux..whats wrong? here my compose:

postgresdb:
    image: postgres:alpine
    container_name: postgres_container
    environment:
      - POSTGRES_USER=${DB_USERNAME}
      - POSTGRES_PASSWORD=${DB_PASSWORD}
      - POSTGRES_DB=${DB_NAME}
      - DATABASE_HOST=${DB_HOST}
    ports:
      - 5432:5432
    volumes:
      - ./pg_data:/var/lib/postgresql/data

volumes:
  pg_data:

5cbc21b8-0001-48a3-986e-b4333129612e

LaurentGoderre commented 9 months ago

It seems that field doesn't exist anymore in Postgres 15.

LaurentGoderre commented 9 months ago

Is the volume data that was created in Postgres prior to version 15?

https://www.postgresql.org/docs/15/release-15.html#id-1.11.6.9.4

MrWildanMD commented 9 months ago

i'm not sure because my initial setup yaml is like what i post...i only specify postgres:alpine and i don't know why it works fine on my linux but not on mac, that put me to confuse

LaurentGoderre commented 9 months ago

Maybe one uses a local tag of Postgres latest pinned to version 14 and using a new machine uses the new version.

MrWildanMD commented 9 months ago

ah, that sound make sense...alright updated my docker-compose to use latest version instead of alpine one

image: postgres:latest