From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Aleksander Alekseev <aleksander(at)timescale(dot)com> |
Cc: | Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Add common function ReplicationOriginName. |
Date: | 2022-09-20 06:50:39 |
Message-ID: | CAA4eK1JE3wxuAcvPtWv+9ZQcoAsxwdik8KOCQqnihjdUEE55LQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Sep 19, 2022 at 2:27 PM Aleksander Alekseev
<aleksander(at)timescale(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2022-09-20 07:26:55 | Re: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures |
Previous Message | Florin Irion | 2022-09-20 06:41:56 | Re: pg_create_logical_replication_slot argument incongruency |