Re: pg_receivexlog and replication slots

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: furuyao(at)pm(dot)nttdata(dot)co(dot)jp
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_receivexlog and replication slots
Date: 2014-08-18 05:38:06
Message-ID: CAB7nPqT7+o1zi4y4-_jgGZAXusgh2uSNK4paBDZvizY-fsG-FA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 15, 2014 at 5:17 PM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> wrote:
> Thanks for your review.
>
> On Fri, Aug 15, 2014 at 12:56 AM, <furuyao(at)pm(dot)nttdata(dot)co(dot)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..

Regards,
--
Michael

Attachment Content-Type Size
20140818_physical_slot_receivexlog.patch text/x-patch 16.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2014-08-18 05:42:19 Re: proposal for 9.5: monitoring lock time for slow queries
Previous Message Alvaro Herrera 2014-08-18 05:05:30 Re: [PATCH] Incremental backup: add backup profile to base backup