pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedPostgresql switch over process
4+ messages / 3 participants
[nested] [flat]
* Postgresql switch over process
@ 2012-10-17 19:15 Shams Khan <shams.khan22@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Shams Khan @ 2012-10-17 19:15 UTC (permalink / raw)
To: pgsql-admin
Can somebody tell me how we can automate the switch over process, I
know there is once file recovery.conf which contains the parameter
trigger_file. But my question is what code that file contains....Hope
my thinking is correct.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Postgresql switch over process
@ 2012-10-17 19:20 Shams Khan <shams.khan22@gmail.com>
parent: Shams Khan <shams.khan22@gmail.com>
0 siblings, 2 replies; 4+ messages in thread
From: Shams Khan @ 2012-10-17 19:20 UTC (permalink / raw)
To: pgsql-admin
Can somebody tell me how we can automate the switch over process, I
know there is once file recovery.conf which contains the parameter
trigger_file. But my question is what code that file contains....Hope
my thinking is correct.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Postgresql switch over process
@ 2012-10-17 19:48 Bill MacArthur <webmaster@dhs-club.com>
parent: Shams Khan <shams.khan22@gmail.com>
1 sibling, 0 replies; 4+ messages in thread
From: Bill MacArthur @ 2012-10-17 19:48 UTC (permalink / raw)
To: pgsql-admin
On 10/17/2012 3:20 PM, Shams Khan wrote:
> Can somebody tell me how we can automate the switch over process, I
> know there is once file recovery.conf which contains the parameter
> trigger_file. But my question is what code that file contains....Hope
> my thinking is correct.
>
>
The trigger file itself contains nothing. You can simply create an empty file when it's needed. You can use 'touch' in linux. The server will see that it has appeared and do what it needs to do from there.
Bill MacArthur
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Postgresql switch over process
@ 2012-10-18 08:10 Albe Laurenz <laurenz.albe@wien.gv.at>
parent: Shams Khan <shams.khan22@gmail.com>
1 sibling, 0 replies; 4+ messages in thread
From: Albe Laurenz @ 2012-10-18 08:10 UTC (permalink / raw)
To: Shams Khan *EXTERN* <shams.khan22@gmail.com>; pgsql-admin
Shams Khan wrote:
> Can somebody tell me how we can automate the switch over process, I
> know there is once file recovery.conf which contains the parameter
> trigger_file. But my question is what code that file contains....Hope
> my thinking is correct.
The contents of the trigger file are irrelevant, it is just a
switch: the existence of the file tells the standby to stop
recovering.
To automate failover, you need some cluster software.
It is a nontrivial problem to detect if the primary really
went down. You can't have the standby make this decision
by itself -- it could be that it is the standby that has a problem
that keeps it from seeing the primary.
Moreover, you should have a way to deactivate the old primary
when you fail over, otherwise you might end up with two
servers who both think that they are the active one.
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2012-10-18 08:10 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-10-17 19:15 Postgresql switch over process Shams Khan <shams.khan22@gmail.com>
2012-10-17 19:20 ` Shams Khan <shams.khan22@gmail.com>
2012-10-17 19:48 ` Bill MacArthur <webmaster@dhs-club.com>
2012-10-18 08:10 ` Albe Laurenz <laurenz.albe@wien.gv.at>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox