Re: adding a new column in IDENTIFY_SYSTEM - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: adding a new column in IDENTIFY_SYSTEM
Date
Msg-id BANLkTimZ-BQ+9Q2jiFH8Shm=06EyaXx5AA@mail.gmail.com
Whole thread Raw
In response to Re: adding a new column in IDENTIFY_SYSTEM  (Jaime Casanova <jaime@2ndquadrant.com>)
Responses Re: adding a new column in IDENTIFY_SYSTEM  (Jaime Casanova <jaime@2ndquadrant.com>)
List pgsql-hackers
On Wed, May 25, 2011 at 8:26 AM, Jaime Casanova <jaime@2ndquadrant.com> wrote:
> On Fri, May 20, 2011 at 12:50 PM, Magnus Hagander <magnus@hagander.net> wrote:
>>
>> Yes. It might be useful to note it, and then ust make an override
>> flag. My pointm, though, was that doing it for walreceiver is more
>> important and a more logical first step.
>>
>
> ok, patch attached.

Why is the check of WAL version required for streaming replication?
As Tom said, if the version is different between two servers, the
check of system identifier fails first. No?

+     primary_xlp_magic = atoi(PQgetvalue(res, 0, 2));

You wrongly get the third field (i.e., current xlog location) as the
WAL version.
You should call PQgetvalue(res, 0, 3), instead.

> errdetail("Expected 1 tuple with 3 fields, got %d tuples with %d fields.",

You need to change the above message.

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: 9.2 schedule
Next
From: Greg Smith
Date:
Subject: Re: 9.2 schedule