Re: In logical replication concurrent update of partition key createsa duplicate record on standby. - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: In logical replication concurrent update of partition key createsa duplicate record on standby.
Date
Msg-id CAMsr+YE6vFbqm8FgC6DF-=qJXmx4pWBTeJr8TZNT1QrHhr16RA@mail.gmail.com
Whole thread Raw
In response to Re: In logical replication concurrent update of partition key createsa duplicate record on standby.  (Amit Khandekar <amitdkhan.pg@gmail.com>)
List pgsql-hackers
On 7 February 2018 at 17:33, Amit Khandekar <amitdkhan.pg@gmail.com> wrote:
 

A quick thinking on how to resolve this makes me wonder if we can
manage to pass some information through logical decoding that the
delete is part of a partition key update. This is analogous to how we
set some information locally in the tuple by setting
tp.t_data->t_ctid.ip_blkid to InvalidBlockNumber.


We already do something similar for UPDATEs that change the REPLICA IDENTITY; we include the oldkey in extra WAL.

The main question is whether the required knowledge is available at a suitable level. 

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [HACKERS] Restrict concurrent update/delete with UPDATE ofpartition key
Next
From: Amit Kapila
Date:
Subject: Re: In logical replication concurrent update of partition key createsa duplicate record on standby.