From: Jeff Davis <pgsql@j-davis.com>
To: Peter Eisentraut <peter@eisentraut.org>
To: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-bugs@postgresql.org
Subject: Re: pg_dump assertion failure with "-n pg_catalog"
Date: Tue, 05 Sep 2023 15:33:09 -0700
Message-ID: <c1037306f233c7705d00e05239d9c98a6bd62ad7.camel@j-davis.com> (raw)
In-Reply-To: <be43b547-3e28-769f-47d8-5b44f95facae@eisentraut.org>
References: <ce071503fee88334aa70f360e6e4ea14d48305ee.camel@j-davis.com>
<ZIbAuHfnWY05VxVt@paquier.xyz>
<e7c1adfe66542eca348de7485990abfabdbc1086.camel@j-davis.com>
<be43b547-3e28-769f-47d8-5b44f95facae@eisentraut.org>
On Tue, 2023-09-05 at 11:45 +0200, Peter Eisentraut wrote:
> This new code replaces an (unexpected) null value with an empty
> string.
> Is that correct? Empty locale strings have specific behaviors under
> the
> libc and icu providers. It seems to me it would be better to error
> out
> or don't print a CREATE COLLATION command at all rather than
> substituting a value that is not a correct substitute.
It already issues a warning, which seemed more consistent with other
unexpected situations in pg_dump.
> Alternatively, a more correct way to produce a null value would be to
> not issue the assignment at all (omit the " lc_collation = " etc.).
> Then we can leave it up to the backend to accept the command or not,
> but
> at least the dump closely reflects the original catalog state.
The backend does not accept a collation specified with lc_ctype and not
lc_collate (or vice versa), so it would be an un-restorable dump. That
doesn't seem great.
Regards,
Jeff Davis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: pgsql@j-davis.com, peter@eisentraut.org, michael@paquier.xyz
Subject: Re: pg_dump assertion failure with "-n pg_catalog"
In-Reply-To: <c1037306f233c7705d00e05239d9c98a6bd62ad7.camel@j-davis.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox