pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gabriele Bartolini <Gabriele.Bartolini@2ndQuadrant.it>
To: Manoj Govindassamy <manoj@nimblestorage.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Postgres 9.1 Synchronous Replication and stuck queries during sync repl setup
Date: Wed, 06 Jun 2012 17:51:46 +0200
Message-ID: <d629d3e88a253854ba07ae54beda45c4@2ndquadrant.it> (raw)
In-Reply-To: <ADD354851455FC44A5D8923AD5152DE307A0FA5C@coloex01.nimblestorage.com>
References: <ADD354851455FC44A5D8923AD5152DE307A0FA07@coloex01.nimblestorage.com>
	<ADD354851455FC44A5D8923AD5152DE307A0FA5C@coloex01.nimblestorage.com>

 Hi,

 On Wed, 6 Jun 2012 14:55:15 +0000, Manoj Govindassamy 
 <manoj@nimblestorage.com> wrote:
> PG Slave gets fresh backup from PG master using pg_backup utility
> everytime before it starts up

 That's not necessary. Usually you do this only the first time you set 
 it up, then take advantage of the wal_keep_segments on the master and 
 allow the standby to resync.

> A. I need to know why PG master started accepting connections at (1)
> and still NOT able to fully commit the transactions. Statements that
> are executed after (3) are not seeing this problem.

 This behaviour is perfectly fine. Until the master and the standby are 
 in sync, given that you set the standby to be the synchronous one, the 
 master MUST wait until the standby writes on disk the transaction 
 information.

 I suggest that first you remove the standby server from the list of 
 synchronous servers by commenting the 'synchronous_standby_names' line 
 and wait until the standby catches up (asynchronous streaming 
 replication). Then uncomment the 'synchronous_standby_names' line on the 
 master and issue a reload. From that moment on you will have synchronous 
 streaming replication in place.

 Cheers,
 Gabriele

 P.S.: I took it for granted that the two servers are in the same LAN.
-- 
  Gabriele Bartolini - 2ndQuadrant Italia
  PostgreSQL Training, Services and Support
  Gabriele.Bartolini@2ndQuadrant.it - www.2ndQuadrant.it



view thread (4+ messages)  latest in thread

Message-ID: <d629d3e88a253854ba07ae54beda45c4@2ndquadrant.it>
Permalink:  ../d629d3e88a253854ba07ae54beda45c4@2ndquadrant.it/
Also on:    postgresql.org/message-id/d629d3e88a253854ba07ae54beda45c4@2ndquadrant.it

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: Gabriele.Bartolini@2ndQuadrant.it, manoj@nimblestorage.com
  Subject: Re: Postgres 9.1 Synchronous Replication and stuck queries during sync repl setup
  In-Reply-To: <d629d3e88a253854ba07ae54beda45c4@2ndquadrant.it>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox