Discussion:
[ADMIN] Automatic Failover Hot Standby / Streaming replication
(too old to reply)
Wissem
2012-02-12 17:01:35 UTC
Permalink
Hello,

I am new user of Postgresql, I have successfully set up a Hot Standby /
Streaming replication on 2 servers running on Redhat Linux 5 (Postgresql
version 9.1).

I need to set up an automatic failover and discovered that there is a tool
named; pgpool. I have searched a lot on the net and didn't found a useful
article (step by step) to setup it.

Could you please help me and share any useful document with me?

thanks,

W
杨晓青
2012-02-13 07:37:57 UTC
Permalink
This document may help you.
http://www.pgpool.net/pgpool-web/pgpool-II/doc/pgpool-en.html

see "Failover with Streaming Replication" section.
Post by Wissem
Hello,
I am new user of Postgresql, I have successfully set up a Hot Standby /
Streaming replication on 2 servers running on Redhat Linux 5 (Postgresql
version 9.1).
I need to set up an automatic failover and discovered that there is a tool
named; pgpool. I have searched a lot on the net and didn't found a useful
article (step by step) to setup it.
Could you please help me and share any useful document with me?
thanks,
W
--
-------------------------------------------
best regards

ÑîÏþÇà
Wissem
2012-02-27 12:39:41 UTC
Permalink
Hi,

I already have postgresql 9.1 server installed on this server.
You have to install the postgresql client libraries first, it's missing.
yum install postgresql9.1-client
But I'm not sure about the right package name.
Regards,
--
Matheus de Oliveira
Bacharelado em Ciências de Computação
Laboratório de Computação de Alto Desempenho - LCAD<http://www.lcad.icmc.usp.br/>
Instituto de Ciências Matemáticas e de Computação - ICMC<http://www.icmc.usp.br/>
Universidade de São Paulo - USP <http://www.sc.usp.br/>
Hi Matheus,
When I run ;
$ pgpool -v
pgpool: error while loading shared libraries: libpq.so.5: cannot open
shared object file: No such file or directory
Could you please help installing pgpool ?
Thanks,
Wissem
Wissem,
$ pgpool -v
And check if you are using the newst version, 3.1.2.
If not, I recommend you to download and compile the pgpool source code
by hand (it's easy).
Regards,
--
Matheus de Oliveira
Bacharelado em Ciências de Computação
Laboratório de Computação de Alto Desempenho - LCAD<http://www.lcad.icmc.usp.br/>
Instituto de Ciências Matemáticas e de Computação - ICMC<http://www.icmc.usp.br/>
Universidade de São Paulo - USP <http://www.sc.usp.br/>
Post by Wissem
Hello,
To install pgpool, I run this command in my virtual machine (OS: Redhat
linux 5);
*yum install pgpool-II-91.i386*
Is it correct? this will install full and complete pgpool librairies
necessary for the Hot Standby / Streaming replication on 2 servers on my
machine?
Thanks
Post by 杨晓青
This document may help you.
http://www.pgpool.net/pgpool-web/pgpool-II/doc/pgpool-en.html
see "Failover with Streaming Replication" section.
Post by Wissem
Hello,
I am new user of Postgresql, I have successfully set up a Hot Standby
/ Streaming replication on 2 servers running on Redhat Linux 5 (Postgresql
version 9.1).
I need to set up an automatic failover and discovered that there is a
tool named; pgpool. I have searched a lot on the net and didn't found a
useful article (step by step) to setup it.
Could you please help me and share any useful document with me?
thanks,
W
--
-------------------------------------------
best regards
杚晓青
Wissem
2012-02-27 12:53:19 UTC
Permalink
Hello,

I can't find pgpool.conf file anywhere on the server. Shoud I create it by
hand and where?

Thank you
I installed the missing package and I have;
pgpool -v
pgpool-II version 3.1 (hatsuiboshi)
You have to install the postgresql client libraries first, it's missing.
yum install postgresql9.1-client
But I'm not sure about the right package name.
Regards,
--
Matheus de Oliveira
Bacharelado em Ciências de Computação
Laboratório de Computação de Alto Desempenho - LCAD<http://www.lcad.icmc.usp.br/>
Instituto de Ciências Matemáticas e de Computação - ICMC<http://www.icmc.usp.br/>
Universidade de São Paulo - USP <http://www.sc.usp.br/>
Hi Matheus,
When I run ;
$ pgpool -v
pgpool: error while loading shared libraries: libpq.so.5: cannot open
shared object file: No such file or directory
Could you please help installing pgpool ?
Thanks,
Wissem
Wissem,
$ pgpool -v
And check if you are using the newst version, 3.1.2.
If not, I recommend you to download and compile the pgpool source code
by hand (it's easy).
Regards,
--
Matheus de Oliveira
Bacharelado em Ciências de Computação
Laboratório de Computação de Alto Desempenho - LCAD<http://www.lcad.icmc.usp.br/>
Instituto de Ciências Matemáticas e de Computação - ICMC<http://www.icmc.usp.br/>
Universidade de São Paulo - USP <http://www.sc.usp.br/>
Post by Wissem
Hello,
Redhat linux 5);
*yum install pgpool-II-91.i386*
Is it correct? this will install full and complete pgpool librairies
necessary for the Hot Standby / Streaming replication on 2 servers on my
machine?
Thanks
Post by 杨晓青
This document may help you.
http://www.pgpool.net/pgpool-web/pgpool-II/doc/pgpool-en.html
see "Failover with Streaming Replication" section.
Post by Wissem
Hello,
I am new user of Postgresql, I have successfully set up a Hot
Standby / Streaming replication on 2 servers running on Redhat Linux 5
(Postgresql version 9.1).
I need to set up an automatic failover and discovered that there is
a tool named; pgpool. I have searched a lot on the net and didn't found a
useful article (step by step) to setup it.
Could you please help me and share any useful document with me?
thanks,
W
--
-------------------------------------------
best regards
杚晓青
Matheus de Oliveira
2012-02-27 13:06:40 UTC
Permalink
The default location is /usr/local/etc, but you can change it when you call
the pgpool.

I'm attaching the samples that come with pgpool 3.1.2.

Regards,
--
Matheus de Oliveira

Bacharelado em Ciências de Computação
Laboratório de Computação de Alto Desempenho -
LCAD<http://www.lcad.icmc.usp.br/>
Instituto de Ciências Matemáticas e de Computação -
ICMC<http://www.icmc.usp.br/>
Universidade de São Paulo - USP <http://www.sc.usp.br/>
Post by Wissem
Hello,
I can't find pgpool.conf file anywhere on the server. Shoud I create it by
hand and where?
Thank you
I installed the missing package and I have;
pgpool -v
pgpool-II version 3.1 (hatsuiboshi)
You have to install the postgresql client libraries first, it's missing.
yum install postgresql9.1-client
But I'm not sure about the right package name.
Regards,
--
Matheus de Oliveira
Bacharelado em Ciências de Computação
Laboratório de Computação de Alto Desempenho - LCAD<http://www.lcad.icmc.usp.br/>
Instituto de Ciências Matemáticas e de Computação - ICMC<http://www.icmc.usp.br/>
Universidade de São Paulo - USP <http://www.sc.usp.br/>
Hi Matheus,
When I run ;
$ pgpool -v
pgpool: error while loading shared libraries: libpq.so.5: cannot open
shared object file: No such file or directory
Could you please help installing pgpool ?
Thanks,
Wissem
Wissem,
$ pgpool -v
And check if you are using the newst version, 3.1.2.
If not, I recommend you to download and compile the pgpool source code
by hand (it's easy).
Regards,
--
Matheus de Oliveira
Bacharelado em Ciências de Computação
Laboratório de Computação de Alto Desempenho - LCAD<http://www.lcad.icmc.usp.br/>
Instituto de Ciências Matemáticas e de Computação - ICMC<http://www.icmc.usp.br/>
Universidade de São Paulo - USP <http://www.sc.usp.br/>
Post by Wissem
Hello,
Redhat linux 5);
*yum install pgpool-II-91.i386*
Is it correct? this will install full and complete pgpool librairies
necessary for the Hot Standby / Streaming replication on 2 servers on my
machine?
Thanks
Post by 杨晓青
This document may help you.
http://www.pgpool.net/pgpool-web/pgpool-II/doc/pgpool-en.html
see "Failover with Streaming Replication" section.
Post by Wissem
Hello,
I am new user of Postgresql, I have successfully set up a Hot
Standby / Streaming replication on 2 servers running on Redhat Linux 5
(Postgresql version 9.1).
I need to set up an automatic failover and discovered that there is
a tool named; pgpool. I have searched a lot on the net and didn't found a
useful article (step by step) to setup it.
Could you please help me and share any useful document with me?
thanks,
W
--
-------------------------------------------
best regards
杚晓青
Wissem
2012-02-27 14:33:05 UTC
Permalink
Thank you.

Now, I have the Master / Slave setup.

Virtual machine: Postgresql Master installed + pgpool installed
Virtual machine: Postgresql Slave installed,

The Hot Standby / Streaming replication on 2 servers works perfecly with
manual failover.

Now, I want to configure pgpool to do the automatic failover, my questions
are:

1- How to configure pgpool so it knows the HS/SR configuration I already
setup?
2- How pgpool will know about my HS/SR setup?
3- How to setup the automnatic failover with pgpool?

Thank you
Post by Matheus de Oliveira
The default location is /usr/local/etc, but you can change it when you
call the pgpool.
I'm attaching the samples that come with pgpool 3.1.2.
Regards,
--
Matheus de Oliveira
Bacharelado em Ciências de Computação
Laboratório de Computação de Alto Desempenho - LCAD<http://www.lcad.icmc.usp.br/>
Instituto de Ciências Matemáticas e de Computação - ICMC<http://www.icmc.usp.br/>
Universidade de São Paulo - USP <http://www.sc.usp.br/>
Post by Wissem
Hello,
I can't find pgpool.conf file anywhere on the server. Shoud I create it
by hand and where?
Thank you
I installed the missing package and I have;
pgpool -v
pgpool-II version 3.1 (hatsuiboshi)
You have to install the postgresql client libraries first, it's missing.
yum install postgresql9.1-client
But I'm not sure about the right package name.
Regards,
--
Matheus de Oliveira
Bacharelado em Ciências de Computação
Laboratório de Computação de Alto Desempenho - LCAD<http://www.lcad.icmc.usp.br/>
Instituto de Ciências Matemáticas e de Computação - ICMC<http://www.icmc.usp.br/>
Universidade de São Paulo - USP <http://www.sc.usp.br/>
Hi Matheus,
When I run ;
$ pgpool -v
pgpool: error while loading shared libraries: libpq.so.5: cannot open
shared object file: No such file or directory
Could you please help installing pgpool ?
Thanks,
Wissem
Wissem,
$ pgpool -v
And check if you are using the newst version, 3.1.2.
If not, I recommend you to download and compile the pgpool source
code by hand (it's easy).
Regards,
--
Matheus de Oliveira
Bacharelado em Ciências de Computação
Laboratório de Computação de Alto Desempenho - LCAD<http://www.lcad.icmc.usp.br/>
Instituto de Ciências Matemáticas e de Computação - ICMC<http://www.icmc.usp.br/>
Universidade de São Paulo - USP <http://www.sc.usp.br/>
Post by Wissem
Hello,
Redhat linux 5);
*yum install pgpool-II-91.i386*
Is it correct? this will install full and complete pgpool librairies
necessary for the Hot Standby / Streaming replication on 2 servers on my
machine?
Thanks
Post by 杨晓青
This document may help you.
http://www.pgpool.net/pgpool-web/pgpool-II/doc/pgpool-en.html
see "Failover with Streaming Replication" section.
Post by Wissem
Hello,
I am new user of Postgresql, I have successfully set up a Hot
Standby / Streaming replication on 2 servers running on Redhat Linux 5
(Postgresql version 9.1).
I need to set up an automatic failover and discovered that there
is a tool named; pgpool. I have searched a lot on the net and didn't found
a useful article (step by step) to setup it.
Could you please help me and share any useful document with me?
thanks,
W
--
-------------------------------------------
best regards
杚晓青
Devrim GÜNDÜZ
2012-02-13 12:06:37 UTC
Permalink
Post by Wissem
I am new user of Postgresql, I have successfully set up a Hot
Standby / Streaming replication on 2 servers running on Redhat Linux 5
(Postgresql version 9.1).
I need to set up an automatic failover and discovered that there is a
tool named; pgpool. I have searched a lot on the net and didn't found
a useful article (step by step) to setup it.
Alternatively, you can use Red Hat Cluster Suite, and create the
trigger_file upon failover, with some minor customization in the cluster
files.

http://www.gunduz.org/download.php?dlid=190

will give you ideas about setting up RHCS with PostgreSQL. I don't have
any doc for triggering failover with RHCS, though. Should be very
simple.

Regards,
--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz
Loading...