2

I'm currently trying to migrate an old PHP project to a dockrized stack .

I created 3 services using postgres:10.21 , dpage/pgadmin4 and adminer images :

   postgresql:
    container_name: ${PROJECT_NAME}-postgresql
    build:
      context: './.docker/postgres'
    restart: on-failure
    environment:
      POSTGRES_USER: ****
      POSTGRES_PASSWORD: ****
      POSTGRES_DB: ****
      POSTGRES_INITDB_ARGS: "--encoding=UTF-8"  //  UTF encode
    ports:
      - "${POSTGRES_PORT}:5432"
    volumes:
      - ./.docker/postgres/groomrhv2_dev_2023-06-28.dump:/docker-entrypoint-initdb.d/groomrhv2_dev_2023-06-28.dump
      - ./.docker/postgres/local_pgdata:/var/lib/postgresql/data


  pgadmin:
    build:
      context: './.docker/pgadmin'
    depends_on:
      - postgresql
    container_name: ${PROJECT_NAME}-pgadmin4
    restart: on-failure
    ports:
      - "${PGADMIN_PORT}:80"
    environment:
      PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
      PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
    volumes:
      - ./.docker/pgadmin/pgadmin-data:/var/lib/pgadmin


  adminer:
    image: adminer
    container_name: ${PROJECT_NAME}-adminer
    restart: unless-stopped
    environment:
      ADMINER_DEFAULT_SERVER: postgresql
    ports:
      - "${ADMINER_PORT}:8080"
    command: php -S 0.0.0.0:8080 -t /var/www/html
    #depends_on:
    #- postgresql

When i use adminer i don't have any problem to list the database data, but when i use pgadmin 4 whith postgres 10 i got this error :

missing FROM-clause entry for table "rel" LINE 8: ...ER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid

How can i fix this error ?

Khaled Boussoffara
  • 1,567
  • 2
  • 25
  • 53
  • 1
    1) Postgres 10 is no longer community supported. Ir went EOL November 10, 2022. 2) Add the `pgAdmin` version you are using as update to question. If it is pgAdmin 7.0+ then it does not support Postgres 10 per [Release Notes](https://www.pgadmin.org/docs/pgadmin4/7.4/release_notes_7_0.html). – Adrian Klaver Jul 02 '23 at 23:39
  • I'm using pgadmin 4 – Khaled Boussoffara Jul 03 '23 at 07:13
  • My example was not clear. `pgAdmin4` is the program name and it released with a version number per the page here [Release Notes versions](https://www.pgadmin.org/docs/pgadmin4/7.4/release_notes.html). Find out what release version of `pgAdmin4` you are using. If it is release 7.0 or greater it will not support Postgres 10. – Adrian Klaver Jul 03 '23 at 15:26
  • 1
    Same issue here. Updated pgAdmin 4 from 7.3 to 7.4, maybe this is part of the problem. – jausen brett Jul 05 '23 at 11:50

1 Answers1

4

Upgraded from pgadmin4 7.4 to 7.5¹ and got it working again.

Pgadmin4 v7.5 was released on July 27, 2023.


Downgraded from pgadmin4 7.4¹ to 7.3² previously and got it working again.

See also https://stackoverflow.com/a/76620309/5540231

hakre
  • 193,403
  • 52
  • 435
  • 836
jausen brett
  • 1,111
  • 7
  • 10