]> granicus.if.org Git - postgresql/commit
Sort dependent objects before reporting them in DROP ROLE.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 24 Mar 2019 22:17:41 +0000 (18:17 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 24 Mar 2019 22:17:53 +0000 (18:17 -0400)
commitaf6550d34466b3093edda54a0cc5a6f220d321b7
treefcd7220a18f963930a3515e8a0fb6e136b1df715
parent59ab3be9e4d3e3cdf03bada2f6fb3d71a1e42908
Sort dependent objects before reporting them in DROP ROLE.

Commit 8aa9dd74b didn't quite finish the job in this area after all,
because DROP ROLE has a code path distinct from DROP OWNED BY, and
it was still reporting dependent objects in whatever order the index
scan returned them in.

Buildfarm experience shows that index ordering of equal-keyed objects is
significantly less stable than before in the wake of using heap TIDs as
tie-breakers.  So if we try to hide the unstable ordering by suppressing
DETAIL reports, we're just going to end up having to do that for every
DROP that reports multiple objects.  That's not great from a coverage
or problem-detection standpoint, and it's something we'll inevitably
forget in future patches, leading to more iterations of fixing-an-
unstable-result.  So let's just bite the bullet and sort here too.

Discussion: https://postgr.es/m/E1h6eep-0001Mw-Vd@gemulon.postgresql.org
src/backend/catalog/pg_shdepend.c
src/test/regress/expected/dependency.out