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

From: "MauMau" <maumau307(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Andres Freund" <andres(at)2ndquadrant(dot)com>
Cc: <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-08 11:03:22
Message-ID: 42B0E1C07CB24F4889ED8A345AF8EFC2@maumau
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> problem, the user might not realize he's got one until he starts to wonder
> why autovac/autoanalyze aren't working.

In autovacuum.c, autovacuum workers avoid waiting for the standby by doing:

/*
* Force synchronous replication off to allow regular maintenance even if
* we are waiting for standbys to connect. This is important to ensure we
* aren't blocked from performing anti-wraparound tasks.
*/
if (synchronous_commit > SYNCHRONOUS_COMMIT_LOCAL_FLUSH)
SetConfigOption("synchronous_commit", "local",
PGC_SUSET, PGC_S_OVERRIDE);

Regards
MauMau

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message MauMau 2014-07-08 11:18:14 Re: [RFC: bug fix?] Connection attempt block forever when the synchronous standby is not running
Previous Message MauMau 2014-07-08 10:50:28 Re: [RFC: bug fix?] Connection attempt block forever when the synchronous standby is not running