Re: Slave promotion failure - Mailing list pgsql-general

From Michael Paquier
Subject Re: Slave promotion failure
Date
Msg-id CAB7nPqTvnDG4wHED3vu6-7jS5G5obY-kef4_Hugq2bs1xapT+g@mail.gmail.com
Whole thread Raw
In response to Slave promotion failure  (François Beausoleil <francois@teksol.info>)
Responses Re: Slave promotion failure
List pgsql-general



On Fri, Jun 7, 2013 at 1:37 AM, François Beausoleil <francois@teksol.info> wrote:
I can't seem to promote the slave:

$ sudo -u postgres touch /var/lib/postgresql/9.1/main/recovery.done
# log is silent
This has no effect. recovery.conf is renamed to recovery.done internally by the server. If recovery.done is present in data folder with recovery.conf at the moment of promotion, recovery.done is removed before file renaming. What you can do to use a trigger file for promotion is setting up trigger_file in recovery.conf, then promotion will be kicked once file has been created.


$ sudo -u postgres /usr/lib/postgresql/9.1/bin/pg_ctl promote -D /var/lib/postgresql/9.1/main
server promoting
# log is silent
 
I am not a specialist of the ubuntu-related internals, but this should be enough to promote the server.
 
The postgresql around the time I attempted the promotions is:

2013-06-06 16:21:51.030 UTC - @ 26434 (00000) 2013-06-06 16:20:42 UTC - LOG:  restored log file "0000000400001658000000CB" from archive
2013-06-06 16:22:35.324 UTC - @ 26411 (00000) 2013-06-06 16:20:41 UTC - LOG:  received SIGHUP, reloading configuration files
2013-06-06 16:22:51.457 UTC - @ 26434 (00000) 2013-06-06 16:20:42 UTC - LOG:  restored log file "0000000400001658000000CC" from archive
2013-06-06 16:24:51.034 UTC - @ 26434 (00000) 2013-06-06 16:20:42 UTC - LOG:  restored log file "0000000400001658000000CD" from archive

I also attempted to restart the slave, with and without recovery.done, to no avail. I must be missing something. Someone has an idea? I did read http://www.postgresql.org/docs/9.1/static/warm-standby-failover.html very carefully. I believe I did everything I was supposed to do.
Playing with recovery.done has no effect on the promotion. Perhaps some issue with the layer used for automatic settings?
--
Michael

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: PSA: If you are running Precise/12.04 upgrade your kernel.
Next
From: Scott Marlowe
Date:
Subject: Re: PSA: If you are running Precise/12.04 upgrade your kernel.