Search Postgresql Archives

Re: Monitoring Replication - Postgres 9.2

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

 



On 11/29/2016 6:01 PM, Melvin Davidson wrote:
There is no reason you can't execute a cron job on production to a 
remote db.
eg:
contents of cron
*/5 * * * * psql -U postgres -h 123.4.56.789 -d remote_db_name -f /path_to/exec.sql
...
The OP wants to run queries on the master and the slave, and combine 
them.    Maybe the master could connect to the slave with dblink but I 
hate relying on that.
also, the perl/python script I'm envisioning would have some error 
handling, for instance, if a connection is broken, attempt to 
reconnect.   if the master is up and the slave is down, use NULL for the 
replication_delay since it can't be evaluated.   If the master is down 
after connection retries, panic.
since its using persistent connections, it could execute these queries 
more frequently and track min/max/average sample values over the 
duration of the logging interval.
etc/etc.


--
john r pierce, recycling bits in santa cruz



--
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