Re: Perform COPY FROM encoding conversions in larger chunks

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: John Naylor <john(dot)naylor(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Perform COPY FROM encoding conversions in larger chunks
Date: 2021-01-28 16:43:58
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 28/01/2021 15:05, Heikki Linnakangas wrote:
> Next I'm going to write the pg_upgrade check for
> patch 0004, to get that into a committable state too.

As promised, here are new versions of the remaining patches, with the
pg_upgrade check added. If you have any custom encoding conversions in
the old cluster, pg_upgrade now fails:

> Performing Consistency Checks
> -----------------------------
> Checking cluster versions ok
> Checking database user is the install user ok
> Checking database connection settings ok
> Checking for prepared transactions ok
> Checking for reg* data types in user tables ok
> Checking for contrib/isn with bigint-passing mismatch ok
> Checking for user-defined encoding conversions fatal
> Your installation contains user-defined encoding conversions.
> The conversion function parameters changed in PostgreSQL version 14
> so this cluster cannot currently be upgraded. You can remove the
> encoding conversions in the old cluster and restart the upgrade.
> A list of user-defined encoding conversions is in the file:
> encoding_conversions.txt
> Failure, exiting

To test this, I wrote a dummy conversion function, also attached.

- Heikki

Attachment Content-Type Size
v2-0001-Change-conversion-function-signature.patch text/x-patch 155.2 KB
v2-0002-Do-COPY-FROM-encoding-conversion-verification-in-.patch text/x-patch 19.1 KB
0001-Custom-encoding-conversion-routine-for-testing.patch text/x-patch 4.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-01-28 16:44:09 Re: BUG #16583: merge join on tables with different DB collation behind postgres_fdw fails
Previous Message Jacob Champion 2021-01-28 16:39:29 Re: Allow matching whole DN from a client certificate