Re: Making WAL receiver startup rely on GUC context forprimary_conninfo and primary_slot_name
Вложения
В списке pgsql-hackers по дате отправления:
| От | Michael Paquier |
|---|---|
| Тема | Re: Making WAL receiver startup rely on GUC context forprimary_conninfo and primary_slot_name |
| Дата | |
| Msg-id | 20190110004752.GC2157@paquier.xyz обсуждение исходный текст |
| Ответ на | Re: Making WAL receiver startup rely on GUC context forprimary_conninfo and primary_slot_name (Donald Dong <xdong@csumb.edu>) |
| Ответы |
Re: Making WAL receiver startup rely on GUC context forprimary_conninfo and primary_slot_name
|
| Список | pgsql-hackers |
On Wed, Jan 09, 2019 at 06:00:23AM -0800, Donald Dong wrote: > I wonder why do we need to have this addition? > > src/backend/replication/walreceiver.c > + memset(walrcv->slotname, 0, NAMEDATALEN); > + if (PrimarySlotName) > + strlcpy((char *) walrcv->slotname, PrimarySlotName, NAMEDATALEN); > That's much cleaner to me to clean up the field for safety before starting the process. When requesting a WAL receiver to start, slotname and conninfo gets zeroed before doing anything, you are right that we could do without it actually. > I notice these patterns appear in different places. Maybe it will be > better to have a common method such as pg_str_empty()? That's a pattern used quite a lot for many GUCs, so that's quite separate from this patch. Perhaps it would make sense to have a macro for that purpose for GUCs, I am not sure if that's worth it though. -- Michael
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера