Re: Duplicated assignment of slot_name in walsender.c

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Duplicated assignment of slot_name in walsender.c
Дата
Msg-id 20151027162703.GF240637@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Duplicated assignment of slot_name in walsender.c  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund wrote:

> If you want to do that, I'm unenthusiastically not objecting. But if so,
> let's also do it in IdentifySystem(), SendTimeLineHistory(),
> StartReplication(), SendBackupHeader(), SendXLogRecPtResult() - they're
> modeled after each other.

Okay, pushed with that, backpatched to 9.4 which is where it all applied
with no conflicts, to ease future backpatching pain.  (Some of this code
exists back in 9.3, but git generated a lot of conflicts in
cherry-picking so I didn't bother).

In SendXLogRecPtrResult() we now rely on snprintf's return value, rather
than doing a separate strlen call.  We do have some other places (not a
lot admittedly) in which we rely on snprintf returning correctly.  I
assume that's the norm when there's no possibility of failure.

I wonder why we use MAXFNAMELEN to print %X/%X -- that seems odd.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Rework the way multixact truncations work
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: fortnight interval support