On Tue, Nov 12, 2024 at 5:37 PM Alvaro Herrera <alvherre@alvh.no-ip.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.