deferred primary key and logical replication - Mailing list pgsql-hackers

From Euler Taveira
Subject deferred primary key and logical replication
Date
Msg-id CAH503wA=QLV5bafAx4tVCcONUQoK3zDV-Q3apFjSOWuytqiwpQ@mail.gmail.com
Whole thread Raw
Responses Re: deferred primary key and logical replication  (Ajin Cherian <itsajin@gmail.com>)
Re: deferred primary key and logical replication  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
Hi,

While looking at an old wal2json issue, I stumbled on a scenario that a table
with a deferred primary key is not updatable in logical replication. AFAICS it
has been like that since the beginning of logical decoding and seems to be an
oversight while designing logical decoding. I don't envision a problem with a
deferred primary key in an after commit scenario. Am I missing something?

Just in case, I'm attaching a patch to fix it and also add a test to cover this
scenario.

--
Euler Taveira                 http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: calling procedures is slow and consumes extra much memory againstcalling function
Next
From: Euler Taveira
Date:
Subject: Re: Problem with logical replication