Re: Fixing findDependentObjects()'s dependency on scan order (regressions in DROP diagnostic messages)

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fixing findDependentObjects()'s dependency on scan order (regressions in DROP diagnostic messages)
Date: 2019-02-10 18:01:19
Message-ID: CAH2-Wz=vi2Oq=d+j6Ya6yj_ud9ekCwOQDkEqTG9XLxhZPGN0ng@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Feb 10, 2019 at 8:13 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> How about this comment text?
>
> /*
> * The current target object should have been added to
> * targetObjects while processing the owning object; but it
> * probably got only the flag bits associated with the
> * dependency we're looking at. We need to add the objflags
> * that were passed to this recursion level, too, else we may
> * get a bogus failure in reportDependentObjects (if, for
> * example, we were called due to a partition dependency).
> *
> * If somehow the current object didn't get scheduled for
> * deletion, bleat. (That would imply that somebody deleted
> * this dependency record before the recursion got to it.)
> * Another idea would be to reacquire lock on the current
> * object and resume trying to delete it, but it seems not
> * worth dealing with the race conditions inherent in that.
> */

LGTM. I agree that referencing a counterfactual design that reacquires
the lock instead adds something.

> Just to be be clear, my inclination is to do nothing about this in v11.
> It's not apparent to me that any fix is possible given the v11 dependency
> data, at least not without downsides that'd likely outweigh the upsides.
> We've not seen field complaints about these problems.

I thought that you might have had a trick up your sleeve for v11,
although I had no idea how that would be possible without making sure
that partition dependencies came in pairs to begin with. :-)

I'll reply to your new revision of the patch separately.

--
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-02-10 18:05:24 Re: First-draft release notes for next week's releases
Previous Message Hironobu SUZUKI 2019-02-10 17:46:15 Re: pgbench - add pseudo-random permutation function