Add common function ReplicationOriginName.

Поиск
Список
Период
Сортировка
От Peter Smith
Тема Add common function ReplicationOriginName.
Дата
Msg-id CAHut+Psa8hhfSE6ozUK-ih7GkQziAVAf4f3bqiXEj2nQiu-43g@mail.gmail.com
обсуждение исходный текст
Ответы Re: Add common function ReplicationOriginName.  (Aleksander Alekseev <aleksander@timescale.com>)
Список pgsql-hackers
Hi.

There are already multiple places that are building the subscription
origin name, and there are more coming with some new patches [1] doing
the same:

e.g.
snprintf(originname, sizeof(originname), "pg_%u", subid);

~~

IMO it is better to encapsulate this name formatting in common code
instead of the format string being scattered around the place.

PSA a patch to add a common function ReplicationOriginName. This is
the equivalent of a similar function for tablesync
(ReplicationOriginNameForTablesync) which already existed.

------
[1] https://www.postgresql.org/message-id/flat/CAA4eK1%2BwyN6zpaHUkCLorEWNx75MG0xhMwcFhvjqm2KURZEAGw%40mail.gmail.com

Kind Regards,
Peter Smith.
Fujitsu Australia

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [RFC] building postgres with meson - v13
Следующее
От: "houzj.fnst@fujitsu.com"
Дата:
Сообщение: Fix typos in code comments