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

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: amul sul <sulamul(at)gmail(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key
Date: 2018-02-13 06:02:30
Message-ID: CAA4eK1KtsTqsGDggDCrz2O9Jgo7ma-Co-B8+v3L2zWMA2NHm6A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 7, 2018 at 6:13 PM, amul sul <sulamul(at)gmail(dot)com> wrote:
> On Tue, Feb 6, 2018 at 7:05 PM, amul sul <sulamul(at)gmail(dot)com> wrote:
>> On Sun, Feb 4, 2018 at 10:47 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>>
>> Yes, you are correct standby stopped with a following error:
>>
>> FATAL: inconsistent page found, rel 1663/13260/16390, forknum 0, blkno 0
>> CONTEXT: WAL redo at 0/3002510 for Heap/DELETE: off 6 KEYS_UPDATED
>> LOG: startup process (PID 22791) exited with exit code 1
>> LOG: terminating any other active server processes
>> LOG: database system is shut down
>>
>> I have tested warm standby replication setup using attached script. Without
>> wal_consistency_checking setting, it works fine & data from master to standby is
>> replicated as expected, if this guaranty is enough then I think could skip this
>> error from wal consistent check for such deleted tuple (I guess option
>> b that you have suggested), thoughts?
>
> I tried to mask ctid.ip_blkid if it is set to InvalidBlockId with
> following change in heap_mask:
>

Your change appears fine to me. I think one can set both block number
and offset as we do for HeapTupleHeaderIsSpeculative, but the way you
have done it looks good to me. Kindly include it in the next version
of your patch by adding the missing comment.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-02-13 06:14:05 Re: rename sgml files?
Previous Message Amit Kapila 2018-02-13 06:00:03 Re: In logical replication concurrent update of partition key creates a duplicate record on standby.