From: Peter Eisentraut <peter@eisentraut.org>
To: Jeff Davis <jdavis@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix pg_dump assertion failure when dumping pg_catalog.
Date: Mon, 4 Sep 2023 14:58:45 +0200
Message-ID: <2a31d8ba-38e9-6335-8ba6-9d042c63473b@eisentraut.org> (raw)
In-Reply-To: <E1qYXfk-000MI1-Ql@gemulon.postgresql.org>
References: <E1qYXfk-000MI1-Ql@gemulon.postgresql.org>
On 22.08.23 22:08, Jeff Davis wrote:
> Fix pg_dump assertion failure when dumping pg_catalog.
>
> Commit 396d348b04 did not account for the default collation.
>
> Also, use pg_log_warning() instead of Assert().
>
> Discussion: https://postgr.es/m/ce071503fee88334aa70f360e6e4ea14d48305ee.camel%40j-davis.com
> Reviewed-by: Michael Paquier
> Backpatch-through: 15
I have another question about this patch. The original issue was that
it would trigger an Assert() inside pg_dump when some columns in
pg_collation were null that were not expected. This patch now contains
code like
appendPQExpBufferStr(q, ", lc_collate = ");
- appendStringLiteralAH(q, collcollate, fout);
+ appendStringLiteralAH(q, collcollate ? collcollate : "", fout);
appendPQExpBufferStr(q, ", lc_ctype = ");
- appendStringLiteralAH(q, collctype, fout);
+ appendStringLiteralAH(q, collctype ? collctype : "", fout);
which would produce pg_dump output like
CREATE COLLATION ... (provider = libc, lc_collate = , lc_ctype = );
which is not valid syntax.
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-committers@postgresql.org
Cc: peter@eisentraut.org, jdavis@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix pg_dump assertion failure when dumping pg_catalog.
In-Reply-To: <2a31d8ba-38e9-6335-8ba6-9d042c63473b@eisentraut.org>
* 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