Re: Add common function ReplicationOriginName. - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Add common function ReplicationOriginName.
Date
Msg-id CAA4eK1KoLcodtEpVao7H90+KYt4+xPLXV7m=ejTkVfDvtCi2ag@mail.gmail.com
Whole thread Raw
In response to Re: Add common function ReplicationOriginName.  (Aleksander Alekseev <aleksander@timescale.com>)
Responses Re: Add common function ReplicationOriginName.
List pgsql-hackers
On Tue, Sep 20, 2022 at 2:06 PM Aleksander Alekseev
<aleksander@timescale.com> wrote:
>
> Hi Amit,
>
> > I think it is better to use Size. Even though, it may not fail now as
> > the size of names for origin will always be much lesser but it is
> > better if we are consistent. If we agree with this, then as a first
> > patch, we can make it to use Size in existing places and then
> > introduce this new function.
>
> OK, here is the updated patchset.
>
> * 0001 replaces int's with Size's in the existing code
>

Pushed this one.

> * 0002 applies Peter's patch on top of 0001
>

Can't we use the existing function ReplicationOriginNameForTablesync()
by passing relid as InvalidOid for this purpose? We need a check
inside to decide which name to construct, otherwise, it should be
fine. If we agree with this, then we can change the name of the
function to something like ReplicationOriginNameForLogicalRep or
ReplicationOriginNameForLogicalRepWorkers.

-- 
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [RFC] building postgres with meson - v13
Next
From: Fujii Masao
Date:
Subject: Re: [PATCH]Feature improvement for MERGE tab completion