docker-library / postgres

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

Postgres 16 Docker Image gives error: unrecognized configuration parameter "lc_ctype" #1127

Closed birarisonali26 closed 10 months ago

birarisonali26 commented 10 months ago

Steps to reproduce:

  1. docker pull postgres:16
  2. docker run -d --name postgresnew -e LANG=en_US.utf8 -e POSTGRES_INITDB_ARGS="--locale-provider=icu --icu-locale=en-US" -e POSTGRES_PASSWORD=welcome1 postgres:16
  3. docker exec -ti postgresnew bash
  4. Once inside container, execute: psql -U postgres
  5. this will launch postgresql promt
  6. Enter following command: show lc_ctype
  7. It gives following error:
    postgres=# show lc_ctype
    postgres-# ;
    ERROR:  unrecognized configuration parameter "lc_ctype"
    image

Same query works for Postgres14 Version

image
LaurentGoderre commented 10 months ago

Not sure this is a problem with the image itself. Using your example, running show all; shoows a list and lc_ctype idsn't there but other ones like lc_numeric are so show lc_numeric; works.

Listing the databases shows the ctype though

   Name    |  Owner   | Encoding | Locale Provider |  Collate   |   Ctype    | ICU Locale | ICU Rules |   Access privileges   
-----------+----------+----------+-----------------+------------+------------+------------+-----------+-----------------------
 postgres  | postgres | UTF8     | icu             | en_US.utf8 | en_US.utf8 | en-US      |           | 
 template0 | postgres | UTF8     | icu             | en_US.utf8 | en_US.utf8 | en-US      |           | =c/postgres          +
           |          |          |                 |            |            |            |           | postgres=CTc/postgres
 template1 | postgres | UTF8     | icu             | en_US.utf8 | en_US.utf8 | en-US      |           | =c/postgres          +
           |          |          |                 |            |            |            |           | postgres=CTc/postgres
ImreSamu commented 10 months ago

ERROR: unrecognized configuration parameter "lc_ctype"

In Postgresql 16, many server variables will be removed, which are included in the PG16 Release Notes.


Version 16 contains a number of changes that may affect compatibility with previous releases.

see the full changes: https://www.postgresql.org/docs/16/release-16.html

LaurentGoderre commented 10 months ago

Closing since this is an expected change and there are alternate ways to access the info

birarisonali26 commented 10 months ago

Thanks LaurentGoderre and ImreSamu. This helps.