pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrey Lepikhov <a.lepikhov@postgrespro.ru>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Fixing findDependentObjects()'s dependency on scan order (regressions in DROP diagnostic messages)
Date: Fri, 7 Dec 2018 09:52:12 +0500
Message-ID: <3294d285-d3b3-e159-b3f7-6c2d1b059956@postgrespro.ru> (raw)
In-Reply-To: <CAH2-WznYm9bTi1N1+wTAK=cXTuH23oxFtPqpT_7kYGqS5Xdutw@mail.gmail.com>
References: <CAH2-Wzkypv1R+teZrr71U23J578NnTBt2X8+Y=Odr4pOdW1rXg@mail.gmail.com>
	<0a89eb40-ea89-9037-aad0-3b65c67cdcbd@postgrespro.ru>
	<CAH2-Wz=WRpJeej2xpd+FbzJXYAZZPiTgebTGv1P2NMcvgzvZGw@mail.gmail.com>
	<CAH2-WzmQ7XeKspNyA+K4iRMaVcqquq8G1qtvfK_grdKV-1Oa9w@mail.gmail.com>
	<65ced322-84d2-777a-2fac-5f482c175431@postgrespro.ru>
	<CAH2-WznYm9bTi1N1+wTAK=cXTuH23oxFtPqpT_7kYGqS5Xdutw@mail.gmail.com>



On 06.12.2018 11:52, Peter Geoghegan wrote:
> On Wed, Dec 5, 2018 at 10:35 PM Andrey Lepikhov
> <a.lepikhov@postgrespro.ru> wrote:
>> This solution changes pg_depend relation for solve a problem, which
>> exists only in regression tests.  Very rarely it can be in the
>> partitioning cases. Or is it not?
> 
> I don't think it's a matter of how rarely this will happen. We're
> trying to avoid these diagnostic message changes because they are
> wrong. I don't think that there is much ambiguity about that.  Still,
> it will happen however often the user drops objects belonging to
> partition children, which could be quite often.

I want to say that we need to localize the rules for the order of the 
diagnostic messages as much as possible in dependency.c.
> 
>> I think this decision is some excessive.
>> May be you consider another approach:
>> 1. Order of dependencies in 'DROP ... CASCADE' case is a problem of test
>> tools, not DBMS. And here we can use 'verbose terse'.
>> 2. Print all dependencies in findDependentObjects() on a drop error (see
>> attachment as a prototype).
> 
> You didn't include changes to the regression test output, which seems
> like a big oversight...

It was done knowingly to show the differences in messages that 
introduces this approach.

> messages that are represented in the regression tests. Anyway, I don't
> think it's acceptable to change the messages like this. It makes them
> much less useful.

May you clarify this? If I understand correctly, your solution is that 
user receives a report about the last inserted internal dependency on 
the object. Why the full info about internal dependencies of the object 
much less useful?
> 
> These stability issue keeps coming up, which makes a comprehensive
> approach seem attractive to me. At least 95% of the test instability
> comes from pg_depend.
> 

During the retail index tuple deletion project (heap cleaner subsystem) 
we have non-fixed order of tuples at database relations. This caused to 
unsteady order of text strings in some check-world test results.
Thus, I realized that the order of messages in the test results is 
mostly a game of chance. For this reason I think it is necessary to find 
more general solution of the messages ordering problem.

-- 
Andrey Lepikhov
Postgres Professional
https://postgrespro.com
The Russian Postgres Company




view thread (84+ messages)  latest in thread

Message-ID: <3294d285-d3b3-e159-b3f7-6c2d1b059956@postgrespro.ru>
Permalink:  ../3294d285-d3b3-e159-b3f7-6c2d1b059956@postgrespro.ru/
Also on:    postgresql.org/message-id/3294d285-d3b3-e159-b3f7-6c2d1b059956@postgrespro.ru

 · 

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-hackers@postgresql.org
  Cc: a.lepikhov@postgrespro.ru, pg@bowt.ie, peter.eisentraut@2ndquadrant.com, alvherre@2ndquadrant.com
  Subject: Re: Fixing findDependentObjects()'s dependency on scan order (regressions in DROP diagnostic messages)
  In-Reply-To: <3294d285-d3b3-e159-b3f7-6c2d1b059956@postgrespro.ru>

* 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