Re: pg_upgrade doesn't copy ICU rules on template0

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Bohyun Lee <bohyun(dot)lee(at)databricks(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_upgrade doesn't copy ICU rules on template0
Date: 2026-10-29 01:43:29
Message-ID: CAGRkXqR4QCXx_RH-KqyzXOZa1Q2HfUkAnuUVq1Ezmtx1trMgkw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

> Uh ... say what? template0 is supposed to be immutable after initdb.
> I think the actual problem here is with whatever patch introduced
> the possibility of this value changing.

Users can't change template0 after initdb. The value changes inside
pg_upgrade. Since 16, set_locale_and_encoding() copies the old
template0's locale fields into the new template0 (9637badd9f9). That
way the new cluster doesn't need the same initdb options. It misses
daticurules.

Thanks,
Shihao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message shihao zhong 2026-10-29 01:45:23 Re: [PG19] Wrong results from Memoize with a nondeterministic collation
Previous Message Amit Langote 2026-10-29 01:39:22 Re: SQL/JSON DEFAULT ON ERROR/ON EMPTY evaluation fail should rethrow error unconditionally