[Pgpool-general] replication/failover feature in Master/Slavemode
Sandeep Thakkar
sandeeptt at yahoo.com
Fri Jan 28 06:23:48 UTC 2011
Yes, I'm aware that I need to create a trigger file (same as what is defined in
recovery.conf) to start the failover and promote the Standby to Primary. I have
tried this when I did not use pgpool and it worked fine. I thought, when pgpool
is in picture, it will execute the failver_command, when it detects that primary
is down. and since, the failover_command in my case is to "touch trigger file".
Shouldn't pgpool execute the failover_command here and create that file
automatically? I think, either pgpool is not able to detect that primary is down
or it is unable to execute the failover_command. Am I missing to define anything
in the configuration file?
________________________________
From: "Daniel.Crespo at l-3com.com" <Daniel.Crespo at l-3com.com>
To: Sandeep Thakkar <sandeeptt at yahoo.com>; Guillaume Lelarge
<guillaume at lelarge.info>
Cc: pgpool-general at pgfoundry.org
Sent: Thu, January 27, 2011 9:33:01 PM
Subject: RE: [Pgpool-general] replication/failover feature in Master/Slavemode
“failover_command” entry in pgpool.conf allows you to do whatever you need to do
when pgpool detects a database node degeneration. In your case you would need to
touch the file where PostgreSQL 9.0+ expects it (specified in “trigger_file”
within recovery.conf). Take a look at how postgresql 9.0’s built-in replication
works, and then you’ll know what to touch and where.
-Daniel
From:pgpool-general-bounces at pgfoundry.org
[mailto:pgpool-general-bounces at pgfoundry.org] On Behalf Of Sandeep Thakkar
Sent: Thursday, January 27, 2011 3:50 AM
To: Sandeep Thakkar; Guillaume Lelarge
Cc: pgpool-general at pgfoundry.org
Subject: Re: [Pgpool-general] replication/failover feature in Master/Slavemode
I was just testing the pgpool with one primary and one standby on the same box.
Hot Standby, Streaming replication, load balancing, all are working fine. But, I
see that failover is not happening when I shut down my primary server. When I
manually touch the trigger file, failover happens. I thought, pgpool will
execute the fail over command on it's own. Am I doing anything wrong?
Here is my related settings in pgpool.conf:
failover_command = 'touch <path_to_trigger_file>
My recovery.conf in the data directory of standby contains these variables:
standby_mode
primary_conninfo
restore_command
trigger_file
Please help.
________________________________
From:Sandeep Thakkar <sandeeptt at yahoo.com>
To: Guillaume Lelarge <guillaume at lelarge.info>
Cc: pgpool-general at pgfoundry.org
Sent: Fri, January 14, 2011 2:40:52 PM
Subject: Re: [Pgpool-general] replication/failover feature in Master/Slave mode
Thanks Guillaume.
________________________________
From:Guillaume Lelarge <guillaume at lelarge.info>
To: Sandeep Thakkar <sandeeptt at yahoo.com>
Cc: pgpool-general at pgfoundry.org
Sent: Wed, January 12, 2011 8:09:53 PM
Subject: Re: [Pgpool-general] replication/failover feature in Master/Slave mode
Hi,
Le 12/01/2011 15:10, Sandeep Thakkar a écrit :
> [...]
> I have a primary and a standby server on different boxes and both are running
>on
>
> different ports. I would like to use pgpool for Streaming Replication and
> Failover. Hence, I selected Master/Slave mode with stream. Now, I have a
> question, if I write anything on primary, how will the data be replicated on
> standby? Will it happen automatically like it does in replication mode Or do I
> need to look into Hot Standby feature of PG?
>
You need to look at the streaming replication feature of PostgreSQL. You
need Hot Standby for example if you want to use the load balacing
feature of pgPool.
> Also, on failover (let's say primary goes down for some reason), and the
>standby
>
> now takes over. Will the standby has write operations?
>
You need to write scripts for that.
> Also, in my application, will I use the pgpool port, so that I do not need to
> change the configuration file in case of failover?? With Slony, we had to tell
> the application to use the other port.
>
The pgpool port, always.
--
Guillaume
http://www.postgresql.fr
http://dalibo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pgfoundry.org/pipermail/pgpool-general/attachments/20110127/2c11750d/attachment.html>
More information about the Pgpool-general
mailing list