Wed May 16 13:50:56 PDT 2007
- Previous message: [Slony1-general] How to determine if the slave is up to date?
- Next message: [Slony1-general] How to determine if the slave is up to date?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thanks!
Seems it is what I was looking for:
1. Current state of the Master:
master# STATE :=3D (select st_last_event from _cluster.sl_status limit 1)
2. Current slave ID:
slave# SLAVE_ID :=3D (select _cluster.getlocalnodeid('_cluster'));
3. If the slave is more up-to-date than master:
master# (select min(st_last_received) from _cluster.sl_status where
st_received =3D SLAVE_ID) >=3D STATE
On 5/16/07, Christopher Browne <cbbrowne at ca.afilias.info> wrote:
>
> "Dmitry Koterov" <dmitry at koterov.ru> writes:
> > Hello.
> > Is it possible to determine that a slave has up-to-date status according
> to the master's status at some time?
> > E.g. I want to post some update to the master at the moment A, remember
> its "up-to-date counter" and a second or two later (moment B) - check if =
the
> slave has greater
> > or equal value of this counter. If so, I suppose than at the moment B
> slave is "up-to-date" relative to the master at the moment A.
> > In previous Slony version I could use "select last_value from
> "_moikrug_cluster".sl_log_status" to fetch such counter from the master, =
but
> in the recent Slony version
> > this counter seems to be always zero.
> > I understant that I could implement this functionality manually (create
> a sequence and increment it on the master with later checking at the slav=
e),
> but possibly Slony
> > has already such sequence implemented?
>
> Look at the view "sl_status", on the origin node for a given set.
>
> The view lists what has been confirmed by all the other nodes, and
> even includes a count of how many events each subscriber is behind.
> --
> output =3D ("cbbrowne" "@" "ca.afilias.info")
> <http://dba2.int.libertyrms.com/>
> Christopher Browne
> (416) 673-4124 (land)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.slony.info/pipermail/slony1-general/attachments/20070517/=
837d4c31/attachment.htm
- Previous message: [Slony1-general] How to determine if the slave is up to date?
- Next message: [Slony1-general] How to determine if the slave is up to date?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list