Re: unite recovery.conf and postgresql.conf
От | Robert Haas |
---|---|
Тема | Re: unite recovery.conf and postgresql.conf |
Дата | |
Msg-id | CA+TgmobgYHz3He7DU_uqEoNdvWenq--D62FVc+kXHbdOXPF5Hg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: unite recovery.conf and postgresql.conf (Josh Berkus <josh@agliodbs.com>) |
Ответы |
Re: unite recovery.conf and postgresql.conf
|
Список | pgsql-hackers |
On Tue, Sep 20, 2011 at 1:01 PM, Josh Berkus <josh@agliodbs.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 happenbehind 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
В списке pgsql-hackers по дате отправления: