Re: Add common function ReplicationOriginName.

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Aleksander Alekseev <aleksander(at)timescale(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Peter Smith <smithpb2250(at)gmail(dot)com>
Subject: Re: Add common function ReplicationOriginName.
Date: 2022-09-21 05:23:45
Message-ID: CAA4eK1KoLcodtEpVao7H90+KYt4+xPLXV7m=ejTkVfDvtCi2ag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 20, 2022 at 2:06 PM Aleksander Alekseev
<aleksander(at)timescale(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2022-09-21 05:25:08 Re: [PATCH]Feature improvement for MERGE tab completion
Previous Message Andres Freund 2022-09-21 05:15:21 Re: [RFC] building postgres with meson - v13