public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tim McLaughlin <[email protected]>
To: Greg Sabino Mullane <[email protected]>
Cc: [email protected]
Subject: Re: BUG #19434: adding WHERE to a publication can cause UPDATEs and DELETEs to fail on the source table
Date: Sun, 5 Apr 2026 08:41:08 -0400
Message-ID: <CAA6J38LaBbDa5+9kng8R=nBQksqvtFqwoPfE-0z8if4GhLp9ww@mail.gmail.com> (raw)
In-Reply-To: <CAKAnmm+csbrmkn5SFUd60SAAfe9P1+srbjuEPWvH+3XNCvDrwA@mail.gmail.com>
References: <[email protected]>
<CAKAnmm+csbrmkn5SFUd60SAAfe9P1+srbjuEPWvH+3XNCvDrwA@mail.gmail.com>
Greg,
I'm actually working on another project that uses CDC for fraud detection
and it occurred to me that it would be really great if there was an
explicit way to just add a column to the "important columns" in general
when the table is added to a publication. I'm currently using a
pg_logical_embed_message to do it, but it would be a lot cleaner if there
was something like this:
ALTER PUBLICATION mypublication ADD TABLE users (user_id, firstname)
INCLUDE (account_id) WHERE (status = 'ACTIVE');
It would effectively then have account_id & status always included in the
NEW column.
Cheers,
Tim
On Mon, Mar 23, 2026 at 12:47 PM Greg Sabino Mullane <[email protected]>
wrote:
> I don't think this is really a bug, more of a feature request /
> optimization. However, I do agree this is an important one. I don't see
> offhand why we can't append the where list to our existing list of
> important columns. There would be a few downsides, but none that would be
> worse than going full replica identity or creating a new index. I'll see
> about making a proof of concept patch and throwing it on -hackers. Will cc
> you on that.
>
> Cheers,
> Greg
>
>
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]
Subject: Re: BUG #19434: adding WHERE to a publication can cause UPDATEs and DELETEs to fail on the source table
In-Reply-To: <CAA6J38LaBbDa5+9kng8R=nBQksqvtFqwoPfE-0z8if4GhLp9ww@mail.gmail.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