Re: pg_receivexlog and replication slots

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: pg_receivexlog and replication slots
Дата
Msg-id CAB7nPqRgXTN3WAoPLi7B1oPbFbJR+wnfpHOLpaaLmbUBdWkNCg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_receivexlog and replication slots  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: pg_receivexlog and replication slots  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On Wed, Sep 3, 2014 at 11:40 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Sun, Aug 31, 2014 at 9:45 AM, Magnus Hagander <magnus@hagander.net> wrote:
>> Do we really want those Asserts? There is not a single Assert in
>> bin/pg_basebackup today - as is the case for most things in bin/. We
>> typically use regular if statements for things that "can happen", and
>> just ignore the others I think - since the callers are fairly simple
>> to trace.
>
> I have no opinion on whether we want these particular Assert() calls,
> but I note that using Assert() in front-end code only became possible
> in February of 2013, as a result of commit
> e1d25de35a2b1f809e8f8d7b182ce0af004f3ec9.  So the lack of assertions
> there may not be so much because people thought it was a bad idea as
> that it didn't use to work.  Generally, I favor the use of Assert() in
> front-end code in the same scenarios in which we use it in back-end
> code: for checks that shouldn't burden production builds but are
> useful during development.

Well that was exactly why they have been added first. The assertions
have been placed in some functions to check for incompatible
combinations of argument values when those functions are called. I
don't mind re-adding them if people agree that they make sense. IMO
they do and they help as well for the development of future utilities
using replication protocol in src/bin/pg_basebackup as much as the
refactoring work done on this thread.
Regards,
-- 
Michael



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

Предыдущее
От: Etsuro Fujita
Дата:
Сообщение: Re: Optimization for updating foreign tables in Postgres FDW
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Spinlocks and compiler/memory barriers