From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: neil@postgrescompare.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14701: pg_dump fails to dump pg_catalog schema
Date: Mon, 12 Jun 2017 12:02:47 -0400
Message-ID: <d5ce7376-815f-5497-3b5a-0afe77acd112@2ndquadrant.com> (raw)
In-Reply-To: <10396.1497226792@sss.pgh.pa.us>
References: <20170610203905.26508.74104@wrigleys.postgresql.org>
<10396.1497226792@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On 6/11/17 20:19, Tom Lane wrote:
> neil@postgrescompare.com writes:
>> Just installed the beta of v10 on my Mac and attempted to dump the contents
>> of pg_catalog as follows.
>
>> ./bin/pg_dump -U postgres -n pg_catalog
>> pg_dump: unrecognized collation provider: d
>
> The reason for that is that the "default" collation has collprovider =
> 'd', which pg_dump doesn't know what to do with, and I'm not sure it
> could do anything sensible with given that CREATE COLLATION doesn't
> accept anything corresponding to that. OTOH, I'm not real sure what
> is the point of the 'd' value, because I can find no code in the backend
> that deals with COLLPROVIDER_DEFAULT; it seems at best rather accidental
> that the entry works at all. We could get rid of the 'd' and have
> some hack to make initdb insert the appropriate 'i' or 'c' value
> based on USE_ICU, perhaps.
Conceptually, the locale code works like this:
if provider == d
strcoll()
else if provider == c
strcoll_l()
else if provider == i
ucol_strcoll()
[else
apparently dubious here ...]
But actually the code checks for DEFAULT_COLLATION_OID instead of
provider == 'd', so having another collation with provider 'd' isn't
going to do anything useful.
Maybe it would actually be vaguely useful to change that around, now
that I think about it.
> Alternatively, I think that CREATE COLLATION
> ought to grow the ability to accept "provider = default" and pg_dump
> should use that.
We could probably do that at least in pg_dump. What are the
expectations for pg_catalog schema dumps? Are they supposed to be
restorable?
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: peter.eisentraut@2ndquadrant.com, tgl@sss.pgh.pa.us, neil@postgrescompare.com
Subject: Re: BUG #14701: pg_dump fails to dump pg_catalog schema
In-Reply-To: <d5ce7376-815f-5497-3b5a-0afe77acd112@2ndquadrant.com>
References: <20170610203905.26508.74104@wrigleys.postgresql.org> <10396.1497226792@sss.pgh.pa.us> <d5ce7376-815f-5497-3b5a-0afe77acd112@2ndquadrant.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