pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Mithun Cy <mithun.cy@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: DROP OWNED CASCADE vs Temp tables
Date: Tue, 14 Jan 2020 18:59:42 -0300
Message-ID: <20200114215942.GA18482@alvherre.pgsql> (raw)
In-Reply-To: <5771.1578961625@sss.pgh.pa.us>

On 2020-Jan-13, Tom Lane wrote:

> That seems fundamentally wrong.  By the time we've queued an object for
> deletion in dependency.c, we have a lock on it, and we've verified that
> the object is still there (cf. systable_recheck_tuple calls).
> If shdepDropOwned is doing it differently, I'd say shdepDropOwned is
> doing it wrong.

Hmm, it seems to be doing it differently.  Maybe it should be acquiring
locks on all objects in that nested loop and verified them for
existence, so that when it calls performMultipleDeletions the objects
are already locked, as you say.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (10+ messages)  latest in thread

Message-ID: <20200114215942.GA18482@alvherre.pgsql>
Permalink:  ../20200114215942.GA18482@alvherre.pgsql/
Also on:    postgresql.org/message-id/20200114215942.GA18482@alvherre.pgsql

 · 

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-bugs@postgresql.org
  Cc: alvherre@2ndquadrant.com, tgl@sss.pgh.pa.us, mithun.cy@gmail.com, pgsql-hackers@lists.postgresql.org, pgsql-bugs@lists.postgresql.org
  Subject: Re: DROP OWNED CASCADE vs Temp tables
  In-Reply-To: <20200114215942.GA18482@alvherre.pgsql>

* 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