Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key
Amul Sul <sulamul@gmail.com>
From: amul sul <sulamul@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Pavan Deolasee <pavan.deolasee@gmail.com>,
Amit Kapila <amit.kapila16@gmail.com>, Stephen Frost <sfrost@snowman.net>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2018-04-06T07:37:25Z
Lists: pgsql-hackers
On Thu, Apr 5, 2018 at 7:14 AM, Andres Freund <andres@anarazel.de> wrote: > Hi, > > On 2018-04-02 11:26:38 -0400, Robert Haas wrote: >> On Wed, Mar 28, 2018 at 2:12 PM, Andres Freund <andres@anarazel.de> wrote: [....] > I've attached a noticeably editorialized patch: > > - I'm uncomfortable with the "moved" information not being crash-safe / > replicated. Thus I added a new flag to preserve it, and removed the > masking of the moved bit in the ctid from heap_mask(). > > - renamed macros to not mention valid / invalid block numbers, but > rather > HeapTupleHeaderSetMovedPartitions / HeapTupleHeaderIndicatesMovedPartitions > and > ItemPointerSetMovedPartitions / ItemPointerIndicatesMovedPartitions > > I'm not wedded to these names, but I'l be adamant they they're not > talking about invalid block numbers. Makes code harder to understand > imo. > These names are much better than before, thanks. One concern -- instead xxxMovedPartitions can we have xxxPartitionChanged or xxxChangedPartition? xxxMovedPartitions looks (at least to me) like partitions are moved. In other databases, there is maintenance command to move a partition from one tablespace to another, current naming is fine as long as we don't support the same, but if we do then this names will be confusing, comments/thoughts? Regards, Amul
Commits
-
Raise error when affecting tuple moved into different partition.
- f16241bef7cc 11.0 landed
-
Handle INSERT .. ON CONFLICT with partitioned tables
- 555ee77a9668 11.0 cited
-
Change the way we mark tuples as frozen.
- 37484ad2aace 9.4.0 cited