Re: BUG #14701: pg_dump fails to dump pg_catalog schema

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: neil(at)postgrescompare(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14701: pg_dump fails to dump pg_catalog schema
Date: 2017-06-12 04:11:26
Message-ID: 31854.1497240686@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 while processing 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message wangchuanting 2017-06-12 06:25:46 Re: BUG #14680: startup process on standby encounter a deadlock of TwoPhaseStateLock when redo 2PC xlog
Previous Message Michael Paquier 2017-06-12 03:17:08 Re: Re: BUG #14680: startup process on standby encounter a deadlock of TwoPhaseStateLock when redo 2PC xlog