Jan Wieck JanWieck
Wed Jul 14 09:00:34 PDT 2004
On 7/13/2004 8:41 PM, Jeremy M. Guthrie wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 1.  Anyone have a query I can run that will tell me wether the DB I've 
> connected to is active or passive?

Wrong question. Slony is not assigning the "master" role to a DB. Every 
set has one origin at any given point of time. So what you are looking 
for is

     where set_origin = getLocalNodeId(<clustername>);


> 2.  When trying to failover...
> I pass the following to slonik:
> cluster name = tsyslog_cluster;
> lock set (id = 1, origin = 1);
> wait for event (origin = 1, confirmed = 2);
> move set (id = 1, old origin = 1, new origin = 2);
> wait for event (origin = 1, confirmed = 2);
> 
> I get:  <stdin>:2: ERROR: syntax error at or near lock
> 
> any ideas?

Yepp ... you don't tell slonik any admin connninfo's. Not too intuitive 
as an error message, I admit. But the parser is defined to get something 
else between "cluster name" and "lock set".

> 
> 3.  how do I query Postgresql/Slony to find out how far behind it is?

Compare the max() values grouped by node ID between sl_event and sl_confirm.


Jan

-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck at Yahoo.com #



More information about the Slony1-general mailing list