Re: Synch Rep for CommitFest 2009-07

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Synch Rep for CommitFest 2009-07
Date: 2009-07-16 06:07:16
Message-ID: 4A5EC394.6080905@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dimitri Fontaine wrote:
> Le 15 juil. 09 à 23:03, Heikki Linnakangas a écrit :
>> 2. The primary should have no business reading back from the archive.
>> The standby can read from the archive, as it can today.
>
> Sorry to insist, but I'm not sold on your consensus here, yet:
> http://archives.postgresql.org/pgsql-hackers/2009-07/msg00486.php
>
> There's a true need for the solution to be simple to install, and
> providing a side channel for the standby to go read the archives itself
> isn't it.

I think a better way to address that need is to provide a built-in
mechanism for the standby to request a base backup and have it sent over
the wire. That makes the initial setup very easy.

> Furthermore, the counter-argument against having the primary
> able to send data from the archives to some standby is that it should
> still work when primary's dead, but as this is only done in the setup
> phase, I don't see that being able to continue preparing a not-yet-ready
> standby against a dead primary is buying us anything.

The situation arises also when the standby falls badly behind. A simple
solution to that is to add a switch in the master to specify "always
keep X MB of WAL in pg_xlog". The standby will then still find it in
pg_xlog, making it harder for a standby to fall so much behind that it
can't find the WAL it needs in the primary anymore. Tom suggested that
we can just give up and re-sync with a new base backup, but that really
requires built-in base backup capability, and is only practical for
small databases.

I think we should definitely have both those features, but it's not
urgent. The replication works without them, although requires that you
set up traditional archiving as well.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua Tolley 2009-07-16 06:26:54 Re: [PATCH] [v8.5] Security checks on largeobjects
Previous Message Brendan Jurd 2009-07-16 05:22:52 Re: WIP: generalized index constraints