Re: pg_upgrade fails to preserve old versions of the predefined collations

From: Alexander Lakhin <exclusion(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_upgrade fails to preserve old versions of the predefined collations
Date: 2019-11-28 20:58:02
Message-ID: 6d713eb3-7688-b460-1791-cd48b3e4453b@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

28.11.2019 23:25, Thomas Munro пишет:
> On Fri, Nov 29, 2019 at 9:08 AM Alexander Lakhin <exclusion(at)gmail(dot)com> wrote:
>> So for now it seems dangerous to use predefined collations as their old
>> versions are not preserved by pg_upgrade and the user doesn't know which
>> indexes affected by the actual ICU collation changes.
> Yeah, we noticed this while working on a proposal for new
> per-database-object version dependency tracking, and Peter E has
> written a patch to address it:
>
> https://commitfest.postgresql.org/25/2328/
Thank you! This patch is working for me. After pg_upgrade with the
applied patch I'm getting:
postgres=# SELECT oid, collname, collnamespace, collprovider,
collversion FROM pg_collation WHERE collname like 'ru%';
  oid  |  collname   | collnamespace | collprovider | collversion
-------+-------------+---------------+--------------+-------------
 17561 | ru-BY-x-icu |            11 | i            | 58.0.0.50
 17562 | ru-KG-x-icu |            11 | i            | 58.0.0.50
 17563 | ru-KZ-x-icu |            11 | i            | 58.0.0.50
 17564 | ru-MD-x-icu |            11 | i            | 58.0.0.50
 17565 | ru-RU-x-icu |            11 | i            | 58.0.0.50
 17566 | ru-UA-x-icu |            11 | i            | 58.0.0.50
 17567 | ru-x-icu    |            11 | i            | 58.0.0.50
 17568 | ru_RU       |            11 | c            |
 17569 | ru_RU.utf8  |            11 | c            |
 17696 | russian     |          2200 | i            | 58.0.0.50
(10 rows)

Best regards,
Alexander

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-11-28 21:25:54 Re: Do XID sequences need to be contiguous?
Previous Message Thomas Munro 2019-11-28 20:25:02 Re: pg_upgrade fails to preserve old versions of the predefined collations