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

From Amit Kapila
Subject Re: Add common function ReplicationOriginName.
Date
Msg-id CAA4eK1JE3wxuAcvPtWv+9ZQcoAsxwdik8KOCQqnihjdUEE55LQ@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 Mon, Sep 19, 2022 at 2:27 PM Aleksander Alekseev
<aleksander@timescale.com> wrote:
>
> Hi Peter,
>
> > PSA a patch to add a common function ReplicationOriginName
>
> The patch looks good to me.
>
> One nitpick I have is that the 2nd argument of snprintf is size_t
> while we are passing int's. Your patch is consistent with the current
> implementation of ReplicationOriginNameForTablesync() and similar
> functions in tablesync.c.
>

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.

-- 
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Florin Irion
Date:
Subject: Re: pg_create_logical_replication_slot argument incongruency
Next
From: Alvaro Herrera
Date:
Subject: Re: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures