From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | Aleksander Alekseev <aleksander(at)timescale(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com> |
Subject: | Re: Disallow UPDATE/DELETE on table with unpublished generated column as REPLICA IDENTITY |
Date: | 2024-11-12 12:24:40 |
Message-ID: | CAA4eK1+S=Q-U3oL-nBKOMJ1m0W7r+LxZFs4FSdrgxSHzZOGfXA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Nov 12, 2024 at 5:37 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>
> On 2024-Nov-12, Amit Kapila wrote:
>
>
> > > It's not clear to me why doesn't pgoutput cope with generated columns in
> > > replica identities. Maybe that can be reconsidered?
> >
> > In stable branches, we intentionally skip publishing generated columns
> > as we assumed that the subscriber side also had a generated column.
> > So, sending it would be a waste of network bandwidth. OTOH, when one
> > tries to replicate the changes to some other database that didn't have
> > the generated columns concept, it would create a problem. So we
> > developed a new feature for HEAD as part of commits 745217a051 and
> > 7054186c4e which allows the publication of generated columns when
> > explicitly specified by the users.
>
> Ah, I think it's good then, we don't need to do anything further on
> this. It's just not supported on earlier branches (and it doesn't work
> with pgoutput, though it does with other plugins); and master has a
> mechanism for it to work with any output plugin.
>
I think we still need a fix for the master for the case when generated
columns are not published but are part of REPLICA IDENTITY as that
could lead to failures in applying UPDATE and DELETE on subscriber.
Am, I missing something?
--
With Regards,
Amit Kapila.
From | Date | Subject | |
---|---|---|---|
Next Message | Kirill Reshke | 2024-11-12 12:54:46 | CREATE SCHEMA ... CREATE DOMAIN support |
Previous Message | Amit Kapila | 2024-11-12 12:19:47 | Re: logical replication: restart_lsn can go backwards (and more), seems broken since 9.4 |