Re: [RFC: bug fix?] Connection attempt block forever when the synchronous standby is not running

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)com>
Cc: MauMau <maumau307(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [RFC: bug fix?] Connection attempt block forever when the synchronous standby is not running
Date: 2014-07-07 05:14:21
Message-ID: 20140707051421.GD17261@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2014-07-07 04:20:12 +0000, Rajeev rastogi wrote:
>
> On 04 July 2014 19:29, MauMau Wrote:
>
> > [How to fix]
> > Of course, adding "-o '-c synchronous_commit=local'" or "-o '-c
> > synchronous_standby_names='" to pg_ctl start in the recovery script
> > would prevent the problem.
> >
> > But isn't there anything to fix in PostgreSQL? I think the doc needs
> > improvement so that users won't misunderstand that only write
> > transactions would block at commit.
>
> As of now there is no solution for this in PostgreSQL but I had submitted a patch "Standalone synchronous master" in
> 9.4 2014-01 CommitFest, which was rejected because of some issues. This patch was meant to degrade the synchronous
> level of master, if all synchronous standbys are down.
> I plan to resubmit this with better design sometime in 9.5.

That seems to be more less orthogonal to the issue at hand. The problem
here is that a readonly command lead to a wait. And even worse it was a
command the user had no influence over.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-07-07 05:23:44 Re: 9.4 documentation: duplicate paragraph in logical decoding example
Previous Message Rajeev rastogi 2014-07-07 04:20:12 Re: [RFC: bug fix?] Connection attempt block forever when the synchronous standby is not running