Re: pg_start_backup and pg_stop_backup Re: Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

From: Greg Smith <greg(at)2ndquadrant(dot)com>
To: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Aidan Van Dyk <aidan(at)highrise(dot)ca>, Simon Riggs <simon(at)2ndQuadrant(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: pg_start_backup and pg_stop_backup Re: Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct
Date: 2010-04-29 01:53:46
Message-ID: 4BD8E6AA.7010207@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dimitri Fontaine wrote:
> IMO the real fun begins when we talk about multi-slaves support and
> their roles (a failover slave wants the master to wait for it to have
> applied the WAL before to commit, a reporting slave not so much). So
> you'd set the Availability level on each slave and wouldn't commit on
> the master until each slave got what it's configured for, or something
> like that.
>

Ultimately the commit is stuck waiting for the slowest committing sync
operation on the list; it's the bottleneck. Let's presume that the
commit waits can be done in parallel, after sending the transaction to
every slave. Given that and the situation you describe, having per-node
sync levels only turns out to be a useful optimization if the reporting
slave commits slower than the failover slave does. The master is going
to be stuck waiting for the slowest one of the batch regardless of
whether you've optimized them individually.

There is a related situation that I think a per-node sync option would
be more obviously useful for: local failover slave, remote disaster
recovery slave over a WAN, where you accept that a serious disaster
taking out a whole data center will lose some transactions. In that
situation, you'd probably want fsync for the local slave, while going
async for the remote datacenter.

If the commits are done in a serial fashion, tuning sync per-node would
be much more valuable in many use cases.

Regardless, I wouldn't want to burden the first sync rep version with
this requirement. Let's wait until the current scope is cleared before
trying to move the goalposts for the people working on that.

--
Greg Smith 2ndQuadrant US Baltimore, MD
PostgreSQL Training, Services and Support
greg(at)2ndQuadrant(dot)com www.2ndQuadrant.us

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2010-04-29 02:33:32 Re: Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct
Previous Message Greg Smith 2010-04-29 01:36:54 Re: pg_start_backup and pg_stop_backup Re: Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct