From: | Euler Taveira <euler(dot)taveira(at)2ndquadrant(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | deferred primary key and logical replication |
Date: | 2020-05-10 21:10:40 |
Message-ID: | CAH503wA=QLV5bafAx4tVCcONUQoK3zDV-Q3apFjSOWuytqiwpQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 | Content-Type | Size |
---|---|---|
0001-Table-with-deferred-PK-is-not-updatable-in-logical-r.patch | text/x-patch | 4.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Euler Taveira | 2020-05-10 22:08:03 | Re: Problem with logical replication |
Previous Message | Pavel Stehule | 2020-05-10 20:20:53 | calling procedures is slow and consumes extra much memory against calling function |