Search Postgresql Archives

Re: cluster question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 15 August 2017 at 16:35, Andreas Kretschmer <andreas@xxxxxxxxxxxxxxx> wrote:


Am 15.08.2017 um 05:15 schrieb Alex Samad:
Hi

Quick question.  I have a 2 node cluster - each node has its own ip.

But from reading this, I really need a 3rd ip, which potentially floats between the nodes to which ever is the master / rw node.

Is that right? Sort of makes sense I guess


That's one way to solve that problem. If you are using repmgr/repmgrd you can call own commands on events like failover. And, if you are using pgbouncer or connection-pooling you can change the config for pgbouncer (redefine the databases and there connection strings) and reload pgbouncer. You can do that with the event-notification commands defined in your repmgr-config.
Other solution: with some Java-drivers you can define several databases and checks (if the database read-only or rw), the next PostgreSQL 10 will offer a similar feature.


okay think I have it setup, but when i do a switch over it gets stuck here.



NOTICE: STANDBY PROMOTE successful
NOTICE: Executing pg_rewind on old master server
NOTICE: 3 files copied to /var/lib/pgsql/9.6/data
NOTICE: restarting server using '/usr/pgsql-9.6/bin/pg_ctl  -w -D /var/lib/pgsql/9.6/data -m fast restart'
pg_ctl: PID file "/var/lib/pgsql/9.6/data/postmaster.pid" does not exist
Is server running?
starting server anyway
NOTICE: STANDBY FOLLOW successful


doesn't look like the output from https://github.com/2ndQuadrant/repmgr/blob/master/README.md
NOTICE: STANDBY PROMOTE successful
NOTICE: Executing pg_rewind on old master server
NOTICE: 5 files copied to /var/lib/postgresql/9.5/data
NOTICE: restarting server using '/usr/local/bin/pg_ctl -w -D /var/lib/postgresql/9.5/node_1/data -m fast restart'
pg_ctl: PID file "/var/lib/postgresql/9.5/node_1/data/postmaster.pid" does not exist
Is server running?
starting server anyway
NOTICE: node 1 is replicating in state "streaming"
NOTICE: switchover was successful



 
PS.: please don't top-posting.




 
Regards, Andreas

--
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com



--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux