Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key

From: amul sul <sulamul(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key
Date: 2018-04-06 07:37:25
Message-ID: CAAJ_b9755GthPdoWQMBmsA07ULfqF1gZu2x-VncRQCou2TaUDg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 5, 2018 at 7:14 AM, Andres Freund <andres(at)anarazel(dot)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(at)anarazel(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2018-04-06 07:38:43 Re: [HACKERS] MERGE SQL Statement for PG11
Previous Message Sergei Kornilov 2018-04-06 07:28:00 Re: using index or check in ALTER TABLE SET NOT NULL