Re: Move defaults toward ICU in 16? - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Move defaults toward ICU in 16?
Date
Msg-id 558f794c351fb73596e4b05d96f66d01d56b4a50.camel@j-davis.com
Whole thread Raw
In response to Re: Move defaults toward ICU in 16?  (Andres Freund <andres@anarazel.de>)
Responses Re: Move defaults toward ICU in 16?
List pgsql-hackers
On Fri, 2023-02-17 at 12:50 -0800, Andres Freund wrote:
> I think we just drop/recreate template1 and postgres during
> pg_upgrade.

Thank you, that makes much more sense now.

I was confused because pg_upgrade loops through to check compatibility
with all the databases, which makes zero sense if it's going to drop
all of them except template0 anyway. The checks on template1/postgres
should be bypassed.

So the two approaches are:

1. Don't bother with locale provider compatibility checks at all (even
on template0). The emitted CREATE DATABASE statements already specify
the locale provider, so that will take care of everything except
template0. Maybe the locale provider of template0 shouldn't matter, but
some users might be surprised if it changes during upgrade. It also
raises some questions about the other properties of template0 like
encoding, lc_collate, and lc_ctype, which also don't matter a whole lot
(because they can all be changed when using template0 as a template).

2. Update the pg_database entry for template0. This has less potential
for surprise in case people are actually using template0 for a
template.


--
Jeff Davis
PostgreSQL Contributor Team - AWS





pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: Reducing connection overhead in pg_upgrade compat check phase
Next
From: Jeff Davis
Date:
Subject: Re: pg_walinspect memory leaks