Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: amul sul <sulamul@gmail.com>
Cc: Stephen Frost <sfrost@snowman.net>, Robert Haas <robertmhaas@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2018-02-13T06:02:30Z
Lists: 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
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