Re: ATTACH/DETACH PARTITION CONCURRENTLY

Sergei Kornilov <sk@zsrv.org>

From: Sergei Kornilov <sk@zsrv.org>
To: Robert Haas <robertmhaas@gmail.com>, Amit Langote <langote_amit_f8@lab.ntt.co.jp>
Cc: Michael Paquier <michael@paquier.xyz>, David Rowley <david.rowley@2ndquadrant.com>, Alvaro Herrera <alvherre@2ndquadrant.com>, Andres Freund <andres@anarazel.de>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Simon Riggs <simon@2ndquadrant.com>
Date: 2018-12-15T10:04:00Z
Lists: pgsql-hackers
Hello

> OK. Rebased again, and committed (although I forgot to include a link
> to this discussion - sorry about that).

Seems we erroneously moved this thread to next CF: https://commitfest.postgresql.org/21/1842/
Can you close this entry?

regards, Sergei


Commits

  1. Allow ATTACH PARTITION with only ShareUpdateExclusiveLock.

  2. Change lock acquisition order in expand_inherited_rtentry.

  3. Move code for managing PartitionDescs into a new file, partdesc.c

  4. Remove more redundant relation locking during executor startup.

  5. Add assertions that we hold some relevant lock during relation open.

  6. Try to acquire relation locks in RangeVarGetRelid.