Re: Transaction-controlled robustness for replication

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Transaction-controlled robustness for replication
Date: 2008-08-12 17:32:32
Message-ID: 1218562352.5343.101.camel@ebony.2ndQuadrant
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Tue, 2008-08-12 at 12:54 -0400, Bruce Momjian wrote:
> Simon Riggs wrote:
> >
> > On Tue, 2008-08-12 at 11:51 -0400, Bruce Momjian wrote:
> > > I think you need to make it an enumerated type like log_min_messages;
> > > something like:
> > >
> > > wal_transfer_wait
> >
> > Yeh, that way sounds best and I like name.
> >
> > > with values of:
> > >
> > > nothing: have network traffic send WAL as needed
> > > netflush: wait for flush of WAL network packets to slave
> > > process: wait for slave to process WAL traffic and
> > > optionally fsync
> >
> > Suggest
> > async
> > syncnet
> > syncdisk
>
> I think the first two are fine, but 'syncdisk' might be wrong if the slave
> has 'synchronous_commit = off'. Any ideas?

Yes, synchronous_commit can be set in the postgresql.conf, but its great
advantage is it is a userset parameter.

The main point of the post is that the parameter would be transaction
controlled, so *must* be set in the transaction and thus *must* be set
on the master. Otherwise the capability is not available in the way I am
describing.

synchronous_commit applies to transaction commits. The code path would
be completely different here, so having parameter passed as an info byte
from master will not cause code structure problems or performance
problems.

--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2008-08-12 17:33:05 Re: Transaction-controlled robustness for replication
Previous Message Magnus Hagander 2008-08-12 17:27:55 Re: temporary statistics option at initdb time