Re: Slave promotion failure

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: François Beausoleil <francois(at)teksol(dot)info>
Cc: Forums postgresql <pgsql-general(at)postgresql(dot)org>
Subject: Re: Slave promotion failure
Date: 2013-06-06 22:40:20
Message-ID: CAB7nPqTvnDG4wHED3vu6-7jS5G5obY-kef4_Hugq2bs1xapT+g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jun 7, 2013 at 1:37 AM, François Beausoleil <francois(at)teksol(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2013-06-06 22:48:20 Re: PSA: If you are running Precise/12.04 upgrade your kernel.
Previous Message Joshua D. Drake 2013-06-06 22:35:06 PSA: If you are running Precise/12.04 upgrade your kernel.