Re: Add common function ReplicationOriginName.

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Add common function ReplicationOriginName.
Дата
Msg-id CAA4eK1JE3wxuAcvPtWv+9ZQcoAsxwdik8KOCQqnihjdUEE55LQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add common function ReplicationOriginName.  (Aleksander Alekseev <aleksander@timescale.com>)
Ответы Re: Add common function ReplicationOriginName.  (Aleksander Alekseev <aleksander@timescale.com>)
Список 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 по дате отправления:

Предыдущее
От: Florin Irion
Дата:
Сообщение: Re: pg_create_logical_replication_slot argument incongruency
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures