Re: lock level for DETACH PARTITION looks sketchy

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Amit Langote <amitlangote09(at)gmail(dot)com>
Subject: Re: lock level for DETACH PARTITION looks sketchy
Date: 2018-12-20 20:59:59
Message-ID: CA+Tgmob7=XEXAABG8HYq5v2-GS5UqNBt5zaRUrESb7jJT+tJEw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 20, 2018 at 3:58 PM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
> I think what prompted the lock to be AccessShareLock for the child rel
> in the first place is the fact that ATExecDropInherit() (ALTER TABLE NO
> INHERIT) uses AccessShare for the *parent* relation.

Seems like apples and oranges, and also maybe not that safe.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2018-12-20 21:05:44 Re: ATTACH/DETACH PARTITION CONCURRENTLY
Previous Message Alvaro Herrera 2018-12-20 20:58:10 Re: lock level for DETACH PARTITION looks sketchy