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 <htamfids@gmail.com> 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.