Mon Sep 6 05:46:16 PDT 2004
- Previous message: [Slony1-commit] By wieck: Added view sl_status showing the last event sequence of the
- Next message: [Slony1-commit] By wieck: But now ...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Log Message: ----------- Changed sl_status view statement into CREATE OR REPLACE. Added another column st_received_event_ts showing the time when the last confirmed event was generated on the origin and calculate the lag against that. Jan Modified Files: -------------- slony1-engine/src/backend: slony1_funcs.sql (r1.21 -> r1.22) -------------- next part -------------- Index: slony1_funcs.sql =================================================================== RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/backend/slony1_funcs.sql,v retrieving revision 1.21 retrieving revision 1.22 diff -Lsrc/backend/slony1_funcs.sql -Lsrc/backend/slony1_funcs.sql -u -w -r1.21 -r1.22 --- src/backend/slony1_funcs.sql +++ src/backend/slony1_funcs.sql @@ -3882,17 +3882,21 @@ -- This view shows the local nodes last event sequence number -- and how far all remote nodes have processed events. -- ---------------------------------------------------------------------- -create view @NAMESPACE at .sl_status as select - ev_origin as st_origin, - con_received as st_received, - ev_seqno as st_last_event, - ev_timestamp as st_last_event_ts, - con_seqno as st_last_received, - con_timestamp as st_last_received_ts, - ev_seqno - con_seqno as lag_num_events, - current_timestamp - con_timestamp as lag_time - from @NAMESPACE at .sl_event E, @NAMESPACE at .sl_confirm C - where ev_origin = con_origin +create or replace view @NAMESPACE at .sl_status as select + E.ev_origin as st_origin, + C.con_received as st_received, + E.ev_seqno as st_last_event, + E.ev_timestamp as st_last_event_ts, + C.con_seqno as st_last_received, + C.con_timestamp as st_last_received_ts, + CE.ev_timestamp as st_last_received_event_ts, + E.ev_seqno - C.con_seqno as lag_num_events, + current_timestamp - CE.ev_timestamp as lag_time + from @NAMESPACE at .sl_event E, @NAMESPACE at .sl_confirm C, + @NAMESPACE at .sl_event CE + where E.ev_origin = C.con_origin + and CE.ev_origin = E.ev_origin + and CE.ev_seqno = C.con_seqno and (E.ev_origin, E.ev_seqno) in (select ev_origin, max(ev_seqno) from @NAMESPACE at .sl_event
- Previous message: [Slony1-commit] By wieck: Added view sl_status showing the last event sequence of the
- Next message: [Slony1-commit] By wieck: But now ...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list