Re: Update Unicode data to Unicode 16.0.0

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Update Unicode data to Unicode 16.0.0
Date: 2025-02-14 08:02:43
Message-ID: ded025be-72af-458a-af20-8ef5c2e4106c@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 05.02.25 22:47, Jeff Davis wrote:
> (b) we should make reasonable attempts to mitigate potential
> problems.
>
> One idea for (b) resurfaced, which was to make a best-effort check at
> pg_upgrade time for affected indexes. The check would not be
> bulletproof, because we can't catch dependencies that are hidden inside
> SPI (e.g. a plpgsql function that calls LOWER()), but it would catch
> most potential problems.
>
> Patch attached. A few notes:
>
> * The dependency entries don't exist because LOWER(), etc., are
> system objects (pinned); so it queries the indexprs, indpreds,
> partexprs, and conbin.
> * The query is large and perhaps too clever, but it seems to work. I
> tried to add inline comments to the SQL, and pgindent had its own ideas
> about how to format them -- suggestions welcome.
> * We haven't actually done the Unicode update yet, so it will notice
> that the PG17 and PG18 Unicode versions are the same, and return early.
> Either apply on top of the Unicode update patch, or comment out the
> early return for testing.
> * It emits a warning rather than an error, so you need to specify
> pg_upgrade with "-r" to see the output file.
> * I didn't adapt the query to run on pre-17 versions, even though it
> could find some potential problem cases (like an index on NORMALIZE()).
> I can add that if someone thinks it's worthwhile.

This all looks quite reasonable to me. The code could obviously use a
bit closer inspection, but the way you've structured it looked quite
okay to me.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2025-02-14 08:17:48 Re: POC: enable logical decoding when wal_level = 'replica' without a server restart
Previous Message Michael Paquier 2025-02-14 07:42:13 Re: Improve verification of recovery_target_timeline GUC.