Re: Review: Patch for Synchronous Replication

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Thom Brown <thom(at)linux(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Review: Patch for Synchronous Replication
Date: 2010-10-04 13:48:29
Message-ID: AANLkTimGSMApO5kYZEs-UYHK2PG_J3FT2EArK_2tiHbp@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-rrreviewers

On Thu, Sep 30, 2010 at 8:29 AM, Thom Brown <thom(at)linux(dot)com> wrote:
>>> This is a basic review of Fujii Masao's synchronous replication patch

Thanks for the review! And sorry for the delay.

>>> I configured the primary's standby.conf to provide synchronous
>>> replication to a single slave using fsync as it's replication level
>>> and a timeout of 100ms.

In the patch, standbys.conf still cannot accept a timeout setting.
So please specify the standby name and replication level in that file.
$PREFIX/share/standbys.conf.sample would be helpful.

>>> The primary started up fine and was accepting connections.  A base
>>> backup was taken for the standby, and after configuring the standby, I
>>> attempted to bring it up, but received the following error:
>>>
>>> postgres(at)cougar:~/project/data$ pg_ctl start
>>> server starting
>>> postgres(at)cougar:~/project/data$ LOG:  database system was shut down in
>>> recovery at 2010-09-29 22:52:24 BST
>>> LOG:  entering standby mode
>>> LOG:  redo starts at 0/1000020
>>> LOG:  record with zero length at 0/10000B0
>>> FATAL:  could not connect to the primary server: invalid connection
>>> option "standby_name"
>>>
>>> I believe I am using the correct parameter as I followed the
>>> additional documentation provided in the patch.
>>>
>>>
>>> Conclusion
>>> ==========
>>>
>>> It at least appears to me that it isn't functional in its current
>>> state, or there is setup information missing from the
>>> documentation.... or I've make a stupid mistake somewhere (likely).
>>
>> Quick back-peddle... it appears the patch was only successful on the
>> standby.  Only doc changes appeared to make it to the primary.
>> Re-attempt tomorrow.  Apologies.
>
> Well, that doesn't seem to have made any difference.  Confirmed the
> patch was applied in both cases, rebuilt, base backup again etc... no
> change.  Same error as in original review. *shrug*

That's strange. I cannot reproduce that error.

According to the error message, I guess that the patch has not been
applied successfully to the master yet. Could you try applying the
patch and re-installing the patch-applied-postgres again?

Regards,

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-10-04 14:19:50 Re: OUTER keyword
Previous Message Fujii Masao 2010-10-04 12:52:10 Re: streaming replication question

Browse pgsql-rrreviewers by date

  From Date Subject
Next Message Greg Stark 2010-10-04 16:14:06 Re: wip: functions median and percentile
Previous Message Erik Rijkers 2010-10-04 11:46:23 Re: [HACKERS] top-level DML under CTEs