pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Geoghegan <pg@bowt.ie>
Cc: pgsql-committers <pgsql-committers@lists.postgresql.org>
Subject: Re: pgsql: Make heap TID a tiebreaker nbtree index column.
Date: Fri, 22 Mar 2019 13:13:03 -0400
Message-ID: <6226.1553274783@sss.pgh.pa.us> (raw )
In-Reply-To: <5446.1553272377@sss.pgh.pa.us >
References: <E1h6eep-0001Mw-Vd@gemulon.postgresql.org >
<CAH2-WzmFdW-e9+uG5BqzuW7YWBdL9=Vrwgmt5p6vndCeKJ5Z4w@mail.gmail.com >
<13999.1553105283@sss.pgh.pa.us >
<CAH2-Wznu+i765yrRcpKC0m9N2LEFWg=stjF73U7XmakSXWDDAg@mail.gmail.com >
<CAH2-WzkCQ_MtKeOpzozj7QhhgP1unXsK8o9DMAFvDqQFEPpkYQ@mail.gmail.com >
<24277.1553114810@sss.pgh.pa.us >
<16667.1553116435@sss.pgh.pa.us >
<17604.1553118255@sss.pgh.pa.us >
<CAH2-WzmfxXs3bSX6T3DP1wTEWbyhkTiyPZ6o9t2DmcHbBtsCNA@mail.gmail.com >
<17845.1553118645@sss.pgh.pa.us >
<8748.1553119737@sss.pgh.pa.us >
<CAH2-Wz=U8tcaP1wx4t2n8-grz-9ar2fPJeYu9MExSyOu_NVmiA@mail.gmail.com >
<CAH2-Wzm0nQyV3x06_XEuH62tda8X6op-4r29uj8VA0XambsUpw@mail.gmail.com >
<21983.1553138224@sss.pgh.pa.us >
<CAH2-WzmMakut=D8=TnmzhGtB+ELbb6k84LYNW28C8MZ2D-ZoJw@mail.gmail.com >
<5446.1553272377@sss.pgh.pa.us >
I wrote:
> I'm fairly baffled as to why the output order would be unstable
> given the sort, and even more as to why the instability didn't
> emerge before. Any thoughts?
Well, after actually looking at the code, the answer to the first
part of that is obvious: the printed dependency list comes from
checkSharedDependencies(), which is not where I put the sort.
(That is, I fixed DROP OWNED BY, but this error is coming from
DROP ROLE which is not the same code path.)
One might reasonably ask why it's not the same code path, perhaps,
but I'm not really excited about trying to change that right now.
Anyway, looking through our regression tests, there are a total
of four cases where a DROP ROLE command fails with a DETAIL that
mentions more than one object and so might be vulnerable to this
type of problem. (There are several more where we already used
verbosity-reduction to suppress the DETAIL.)
Options:
1. Adjust checkSharedDependencies to sort before constructing the
message. This might have issues if there are lots and lots of
dependencies, but then again we already would have issues due to
the size of the error message.
1a. As above, but add code to limit to limit the number of
dependencies that are stored/sorted/described, even in the
verbose string sent to the server log.
2. De-revert 7d3bf73ac and hope the other cases aren't problems.
3. Change all of those cases to suppress the DETAIL.
1a seems a bit ambitious but maybe it's worth doing, considering
that right now there's a non-negligible chance of OOM if you
try to drop a role that owns a huge number of objects, or just
plain failure due to the stringinfo buffer for the message getting
past MaxAllocSize. Sending a gigabyte-sized message to the server
log could be pretty unfriendly in some contexts, too.
regards, tom lane
view thread (34+ messages) latest in thread
Message-ID: <6226.1553274783@sss.pgh.pa.us>
Permalink: ../6226.1553274783@sss.pgh.pa.us/
Also on: postgresql.org/message-id/6226.1553274783@sss.pgh.pa.us
copy link · copy postgr.es
reply 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: tgl@sss.pgh.pa.us, pg@bowt.ie, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Make heap TID a tiebreaker nbtree index column.
In-Reply-To: <6226.1553274783@sss.pgh.pa.us>
* 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