Re: Perform COPY FROM encoding conversions in larger chunks
Heikki Linnakangas <hlinnaka@iki.fi>
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: John Naylor <john.naylor@enterprisedb.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-12-23T07:41:43Z
Lists: pgsql-hackers
On 22/12/2020 22:01, John Naylor wrote: > In 0004, it seems you have some doubts about upgrade compatibility. Is > that because user-defined conversions would no longer have the right > signature? Exactly. If you have an extension that adds a custom conversion function and does CREATE CONVERSION, the old installation script will fail on the new version. That causes trouble for pg_dump+restore and pg_upgrade. Perhaps we could accept the old signature in the server when you do CREATE CONVERSION, but somehow mark the conversion as broken in the catalog so that you would get a runtime error if you tried to use it. That would be enough to make pg_dump+restore (and pg_upgrade) not throw an error, and you could then upgrade the extension later (ALTER EXTENSION UPDATE). I'm not sure it's worth the trouble, though. Custom conversions are very rare. And I don't think any other object can depend on a conversion, so you can always drop the conversion before upgrade, and re-create it with the new function signature afterwards. A note in the release notes and a check in pg_upgrade, with instructions to drop and recreate the conversion, are probably enough. - Heikki
Commits
-
Do COPY FROM encoding conversion/verification in larger chunks.
- f82de5c46bdf 14.0 landed
-
Add 'noError' argument to encoding conversion functions.
- ea1b99a6619c 14.0 landed
-
Add direct conversion routines between EUC_TW and Big5.
- 6c5576075b0f 14.0 landed
-
Add mbverifystr() functions specific to each encoding.
- b80e10638e36 14.0 landed