pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Simon Riggs <simon@2ndQuadrant.com>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Fujii Masao <masao.fujii@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Sync Rep for 2011CF1
Date: Wed, 16 Feb 2011 16:32:21 +0000
Message-ID: <1297873941.1747.30561.camel@ebony> (raw)
In-Reply-To: <4D5BEFF9.6020906@enterprisedb.com>
References: <1295127631.3282.100.camel@ebony>
	<AANLkTikbV8afeeC6-iESC4myeR5BUzg-YnTqCvKJ3qcO@mail.gmail.com>
	<AANLkTikUxTM+6EaZ8S_OteDzCXaccsPVsd1U_ZUzM5i0@mail.gmail.com>
	<4D543723.9050101@enterprisedb.com>
	<AANLkTinF=DLP20ZJ57mkVa4ofTVLBMYn+pcRsqFMXK-=@mail.gmail.com>
	<AANLkTi=boSWVHgjS6EQSOV9K0y_7gokPzS5vj965NT_A@mail.gmail.com>
	<1297870600.1747.30144.camel@ebony>
	<4D5BEFF9.6020906@enterprisedb.com>

On Wed, 2011-02-16 at 17:40 +0200, Heikki Linnakangas wrote:
> On 16.02.2011 17:36, Simon Riggs wrote:
> > On Tue, 2011-02-15 at 12:08 -0500, Robert Haas wrote:
> >> On Mon, Feb 14, 2011 at 12:25 AM, Fujii Masao<masao.fujii@gmail.com>  wrote:
> >>> On Fri, Feb 11, 2011 at 4:06 AM, Heikki Linnakangas
> >>> <heikki.linnakangas@enterprisedb.com>  wrote:
> >>>> I added a XLogWalRcvSendReply() call into XLogWalRcvFlush() so that it also
> >>>> sends a status update every time the WAL is flushed. If the walreceiver is
> >>>> busy receiving and flushing, that would happen once per WAL segment, which
> >>>> seems sensible.
> >>>
> >>> This change can make the callback function "WalRcvDie()" call ereport(ERROR)
> >>> via XLogWalRcvFlush(). This looks unsafe.
> >>
> >> Good catch.  Is the cleanest solution to pass a boolean parameter to
> >> XLogWalRcvFlush() indicating whether we're in the midst of dying?
> >
> > Surely if you do this then sync rep will fail to respond correctly if
> > WalReceiver dies.
> >
> > Why is it OK to write to disk, but not OK to reply?
> 
> Because the connection might be dead. A broken connection is a likely 
> cause of walreceiver death.

Would it not be possible to check that? 

-- 
 Simon Riggs           http://www.2ndQuadrant.com/books/
 PostgreSQL Development, 24x7 Support, Training and Services
 




view thread (89+ messages)  latest in thread

Message-ID: <1297873941.1747.30561.camel@ebony>
Permalink:  ../1297873941.1747.30561.camel@ebony/
Also on:    postgresql.org/message-id/1297873941.1747.30561.camel@ebony

 · 

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-hackers@postgresql.org
  Cc: simon@2ndQuadrant.com, heikki.linnakangas@enterprisedb.com, robertmhaas@gmail.com, masao.fujii@gmail.com
  Subject: Re: Sync Rep for 2011CF1
  In-Reply-To: <1297873941.1747.30561.camel@ebony>

* 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