Re: BUG #17923: Excessive warnings of collation version mismatch in logs

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: buschmann(at)nidsa(dot)net, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17923: Excessive warnings of collation version mismatch in logs
Date: 2023-05-10 05:30:41
Message-ID: 6c53254e-3e03-aa73-6007-bc67397fd507@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 07.05.23 12:13, PG Bug reporting form wrote:
> 1. Why isn't it sufficient to report this message only at server startup ?
> The messages are sent to psql too, but only when logging into one of these
> mostly unused databases, so it is not observed in a regular routine.

Each database is separate. The server doesn't look at each database on
startup. This is only done when you connect to a given database.

> 2. Why is this message reported for databases with no objects or similar
> cases?

When you connect to a database, the server doesn't scan all objects in
the database to see if they might be affected. That would be too slow.

If you have no objects in the database, you can just run the provided
REFRESH command to make the warning go away.

> 3. Is there a real collation change in glibc 2.37 or is it only a version
> number mismatch with changes only in other parts of the library?

We don't know, because glibc isn't reliable at telling us about it. So
we take the safe course.

> 4. Could the version information be shown in \l output of psql?

That's a valid idea.

> 5. Wouldn't it make sense to automatically update the collation version
> number of such databases (without any collation-related objects) at server
> startup?

See #2. We are not going to start scanning each database on each
connection to check whether it might be empty.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2023-05-10 10:10:12 BUG #17927: Postgres does not compile with LLVM-16
Previous Message Michael Paquier 2023-05-10 02:26:37 Re: BUG #17804: Assertion failed in pg_stat after fetching from pg_stat_database and switching cache->snapshot