Re: pg_receivexlog and replication slots

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: pg_receivexlog and replication slots
Дата
Msg-id CAHGQGwGac0cB+aaCxXECnkiZ4WntDuqtS_HTn9psHU4hFgFVrA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_receivexlog and replication slots  (Fujii Masao <masao.fujii@gmail.com>)
Список pgsql-hackers
On Mon, Aug 18, 2014 at 3:48 PM, Fujii Masao <masao.fujii@gmail.com> wrote:
> On Mon, Aug 18, 2014 at 2:38 PM, Michael Paquier
> <michael.paquier@gmail.com> wrote:
>> On Fri, Aug 15, 2014 at 5:17 PM, Michael Paquier
>> <michael.paquier@gmail.com> wrote:
>>> Thanks for your review.
>>>
>>> On Fri, Aug 15, 2014 at 12:56 AM,  <furuyao@pm.nttdata.co.jp> wrote:
>>>> At consistency with pg_recvlogical, do you think about --start?
>>> I did not add that for the sake of backward-compatibility as in
>>> pg_recvlogical an action is mandatory. It is not the case now of
>>> pg_receivexlog.
>>>
>>>> [postgres postgresql-6aa6158]$ make > /dev/null
>>>> streamutil.c: In function 'CreateReplicationSlot':
>>>> streamutil.c:244: warning: suggest parentheses around '&&' within '||'
>>> I see. Here is a rebased patch.
>>
>> Looking more at the code, IDENTIFY_SYSTEM management can be unified
>> into a single function. So I have written a newer version of the patch
>> grouping IDENTIFY_SYSTEM call into a single function for both
>> utilities, fixing at the same time a couple of other issues:
>> - correct use of TimelineID in code
>> - IDENTIFY_SYSTEM checks were incorrect (even in HEAD). The following
>> check was done but in 9.4 this command returns 4 fields:
>> (PQntuples(res) != 1 || PQnfields(res) < 3)
>> That's not directly related to this patch, but making some corrections
>> is not going to hurt..
>
> Good catch! I found that libpqwalreceiver.c, etc have the same problem.
> It's better to fix this separately. Patch attached.

BTW, the name of the forth column in IDENTIFY_SYSETM is "dbname". Maybe I don't
like this name because we usually use "datname" as the name of column which
identify the database name. For example, pg_database, pg_stat_activity, etc use
"datname".

Regards,

-- 
Fujii Masao



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

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: pg_receivexlog and replication slots
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: pg_receivexlog and replication slots