Re: ATTACH/DETACH PARTITION CONCURRENTLY
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Simon Riggs <simon@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2018-11-07T13:58:39Z
Lists: pgsql-hackers
On Tue, Nov 6, 2018 at 10:18 PM Alvaro Herrera <alvherre@2ndquadrant.com> wrote: > > > Throw tuples destined for that partition away? > > Surely not. (/me doesn't beat straw men anyway.) > > Hmm, apparently this can indeed happen with my patch :-( D'oh. This is a hard problem, especially the part of it that involves handling detach, so I wouldn't feel too bad about that. However, to beat this possibly-dead horse a little more, I think you made the error of writing a patch that (1) tried to solve too many problems at once and (2) didn't seem to really have a clear, well-considered idea about what the semantics ought to be. This is not intended as an attack; I want to work with you to solve the problem, not have a fight about it. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Allow ATTACH PARTITION with only ShareUpdateExclusiveLock.
- 898e5e3290a7 12.0 landed
-
Change lock acquisition order in expand_inherited_rtentry.
- f4b6341d5fcb 12.0 landed
-
Move code for managing PartitionDescs into a new file, partdesc.c
- 1bb5e7821810 12.0 landed
-
Remove more redundant relation locking during executor startup.
- f2343653f5b2 12.0 cited
-
Add assertions that we hold some relevant lock during relation open.
- b04aeb0a053e 12.0 cited
-
Try to acquire relation locks in RangeVarGetRelid.
- 4240e429d0c2 9.2.0 cited