public inbox for [email protected]
help / color / mirror / Atom feedFrom: [email protected] <[email protected]>
To: Alvaro Herrera <[email protected]>
To: Rahila Syed <[email protected]>
Cc: Amit Kapila <[email protected]>
Cc: Tomas Vondra <[email protected]>
Cc: Peter Smith <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Subject: RE: Column Filtering in Logical Replication
Date: Thu, 16 Dec 2021 09:28:28 +0000
Message-ID: <OS0PR01MB5716634DAF4C8020151D3FAA94779@OS0PR01MB5716.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
On Tues, Dec 14, 2021 1:48 AM Alvaro Herrera <[email protected]> wrote:
> Hmm, I messed up the patch file I sent. Here's the complete patch.
>
Hi,
I have a minor question about the replica identity check of this patch.
+check_publication_add_relation(Relation targetrel, Bitmapset *columns)
...
+ idattrs = RelationGetIndexAttrBitmap(targetrel,
+ INDEX_ATTR_BITMAP_IDENTITY_KEY);
+ if (!bms_is_subset(idattrs, columns))
+ ereport(ERROR,
+ errcode(ERRCODE_INVALID_COLUMN_REFERENCE),
+ errmsg("invalid column list for publishing relation \"%s\"",
+ RelationGetRelationName(targetrel)),
+ errdetail("All columns in REPLICA IDENTITY must be present in the column list."));
+
The patch ensures all columns of RT are in column list when CREATE/ALTER
publication, but it seems doesn't prevent user from changing the replica
identity or dropping the index used in replica identity. Do we also need to
check those cases ?
Best regards,
Hou zj
view thread (167+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: RE: Column Filtering in Logical Replication
In-Reply-To: <OS0PR01MB5716634DAF4C8020151D3FAA94779@OS0PR01MB5716.jpnprd01.prod.outlook.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox