Re: [HACKERS] Restrict concurrent update/delete with UPDATE ofpartition key - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: [HACKERS] Restrict concurrent update/delete with UPDATE ofpartition key
Date
Msg-id CAA4eK1KtsTqsGDggDCrz2O9Jgo7ma-Co-B8+v3L2zWMA2NHm6A@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Restrict concurrent update/delete with UPDATE ofpartition key  (amul sul <sulamul@gmail.com>)
Responses Re: [HACKERS] Restrict concurrent update/delete with UPDATE ofpartition key  (amul sul <sulamul@gmail.com>)
List pgsql-hackers
On Wed, Feb 7, 2018 at 6:13 PM, amul sul <sulamul@gmail.com> wrote:
> On Tue, Feb 6, 2018 at 7:05 PM, amul sul <sulamul@gmail.com> wrote:
>> On Sun, Feb 4, 2018 at 10:47 AM, Amit Kapila <amit.kapila16@gmail.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


pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: In logical replication concurrent update of partition key createsa duplicate record on standby.
Next
From: Tom Lane
Date:
Subject: Re: rename sgml files?