From: | Greg Smith <greg(at)2ndquadrant(dot)com> |
---|---|
To: | Michael Holt <michael(at)aers(dot)ca> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Streaming replication status and fail over questions |
Date: | 2011-06-10 04:02:36 |
Message-ID: | 4DF1975C.7060303@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Michael Holt wrote:
> 1) I've seen things about using pg_current_xlog_location(),
> pg_last_xlog_replay_location(), pg_last_xlog_receive_location() to
> check replication status, but how can this tell me either the time lag
> or actual query lag? Do I need to wait for 9.1 and it's replication
> monitoring features?
You might want to check out repmgr: http://projects.2ndquadrant.com/repmgr
It can collect data in the background that it uses to compute lag in
time units.
> 2) If I have a master to multi-slave setup and need to fail over, is
> there anyway for slaves to detect the new master? Without this it
> seems like fail over could be pretty messy.
repmgr also provides a view to help make this easier to figure out right
now, and the next version due out any day now will go even further
toward automating it completely.
> 3) Finally just wanted to confirm that SR allows only for replication
> of an entire server.
Well, an entire database cluster on a server. I have put more than one
database cluster on a server before in order to make it possible to
replicate only a subset of the data. But that's difficult to pull off,
you end up needing tools like dblink for anything that crosses the two
databases together.
--
Greg Smith 2ndQuadrant US greg(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Bednarz | 2011-06-10 05:13:53 | Re: calling pg_dump from perl |
Previous Message | Greg Sabino Mullane | 2011-06-09 20:16:24 | Re: calling pg_dump from perl |