Re: [BUGS] BUG #14701: pg_dump fails to dump pg_catalog schema - Mailing list pgsql-bugs

From Tom Lane
Subject Re: [BUGS] BUG #14701: pg_dump fails to dump pg_catalog schema
Date
Msg-id 31854.1497240686@sss.pgh.pa.us
Whole thread Raw
In response to Re: [BUGS] BUG #14701: pg_dump fails to dump pg_catalog schema  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
I wrote:
> 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.

Actually, it works only for finite values of "work".  You can break it
by cloning the "default" entry:

regression=# create collation foo from "default";
WARNING:  could not determine encoding for locale "": codeset is "ANSI_X3.4-1968"
WARNING:  could not determine encoding for locale "": codeset is "ANSI_X3.4-1968"
CREATE COLLATION
regression=# select * from pg_collation where collname = 'foo';collname | collnamespace | collowner | collprovider |
collencoding| collcollate | collctype | collversion  
----------+---------------+-----------+--------------+--------------+-------------+-----------+-------------foo      |
       2200 |        10 | d            |            0 |             |           |  
(1 row)
regression=# select * from text_tbl order by f1 collate foo;
server closed the connection unexpectedly       This probably means the server terminated abnormally       before or
whileprocessing the request. 
The connection to the server was lost. Attempting reset: Failed.

The crash is from a SIGSEGV that I didn't bother to identify the
exact location of.  (Note: this is in a non-ICU-enabled build,
prevailing locale "C".)

It wouldn't be unreasonable to disallow cloning "default",
perhaps, but I'd be inclined to want to plug the crash
problem more directly than that.
        regards, tom lane


--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [BUGS] Re: BUG #14680: startup process on standby encounter adeadlock of TwoPhaseStateLock when redo 2PC xlog
Next
From: wangchuanting
Date:
Subject: [BUGS] Re: BUG #14680: startup process on standby encounter a deadlock ofTwoPhaseStateLock when redo 2PC xlog