Re: Support logical replication of global object commands - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Support logical replication of global object commands
Date
Msg-id CAA4eK1KRHZtfNYawZMp=E=zdT5mY+2LcjbctgjT-F9wAM152UQ@mail.gmail.com
Whole thread Raw
In response to Re: Support logical replication of global object commands  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
On Thu, Feb 16, 2023 at 12:02 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Tue, Aug 30, 2022 at 8:09 AM Zheng Li <zhengli10@gmail.com> wrote:
> >
> > > > I think a publication of ALL OBJECTS sounds intuitive. Does it mean we'll
> > > > publish all DDL commands, all commit and abort operations in every
> > > > database if there is such publication of ALL OBJECTS?
> > > >
> > >
> > > Actually, I intend something for global objects. But the main thing
> > > that is worrying me about this is that we don't have a clean way to
> > > untie global object replication from database-specific object
> > > replication.
> >
> > I think ultimately we need a clean and efficient way to publish (and
> > subscribe to) any changes in all databases, preferably in one logical
> > replication slot.
> >
>
> Agreed. I was thinking currently for logical replication both
> walsender and slot are database-specific. So we need a way to
> distinguish the WAL for global objects and then avoid filtering based
> on the slot's database during decoding. I also thought about whether
> we want to have a WALSender that is not connected to a database for
> the replication of global objects but I couldn't come up with a reason
> for doing so. Do you have any thoughts on this matter?
>

Another thing about the patch proposed here is that it LOGs the DDL
for global objects without any consideration of whether that is
required for logical replication. This is quite unlike what we are
planning to do for other DDLs where it will be logged only when the
publication has defined an event trigger for it.

-- 
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Add index scan progress to pg_stat_progress_vacuum
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: Time delayed LR (WAS Re: logical replication restrictions)