Re: unite recovery.conf and postgresql.conf

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: unite recovery.conf and postgresql.conf
Date: 2011-09-20 17:09:29
Message-ID: CA+TgmobgYHz3He7DU_uqEoNdvWenq--D62FVc+kXHbdOXPF5Hg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 20, 2011 at 1:01 PM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
> I'll go further and say that we only want one trigger file by default,
> one which either enables or disables recovery.  I'll further suggest
> that we:
>
> a) have a standby.on file which puts the server in replica/recovery mode
> if it's detected on startup, and
> b) that we poll for the standby.on file going away as a trigger to stop
> recovery and bring up the server in master mode, and
> c) that pg_basebackup automatically create a standby.on file.

It seems a bit confusing to me to have a file that takes effect only
at startup when created but anytime when removed.

I think one of the insufficiently-lauded 9.1 features is Fujii Masao's
"pg_ctl promote". Now THAT is a good interface. Unlike
trigger_file, it doesn't require any advance preparation, or monkeying
with files on disk. You just tell it to promote, and it does. Sweet.
Now it turns out that it uses a file to make that happen behind the
scenes, but who cares? From the user's perspective It Just Works.

I like the idea of some kind of sentinel file that tells the server to
start up in recovery mode. But instead of having the user remove it
to cause a promotion, I think the server should remove it when it does
promote. That's more like what we've done in the past, and it ties in
very nicely with what pg_ctl promote already does.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2011-09-20 17:13:00 Re: unite recovery.conf and postgresql.conf
Previous Message Josh Berkus 2011-09-20 17:01:01 Re: unite recovery.conf and postgresql.conf