Re: Who is Slony Master/Slave + general questions. - Mailing list pgsql-general

From Chris Browne
Subject Re: Who is Slony Master/Slave + general questions.
Date
Msg-id 60y7nv644r.fsf@dba2.int.libertyrms.com
Whole thread Raw
In response to Who is Slony Master/Slave + general questions.  (sjarosz@gmail.com)
List pgsql-general
sjarosz@gmail.com writes:
> Take a scenario: you configure 2 servers as master and slave.  You walk
> for a period of time during which a number failovers occur.  You come
> back.  Can I query a sl_???? table to determine which server is the
> current master and which one is the current slave?

In a sense, the question is a bad one.

There is nothing about a server which inherently gives it a role as
either master or slave as far as Slony-I is concerned.  Nodes are just
nodes.

You may determine that a particular node is the origin of some
particular replication set; that would indicate that, with respect to
that set of tables, a particular node is "master."

Look at sl_set; it contains a list of sets, and indicates, for each,
which node is the origin.
--
"cbbrowne","@","acm.org"
http://cbbrowne.com/info/languages.html
Rules of the Evil Overlord #133.  "If I find my beautiful consort with
access to  my fortress has been  associating with the  hero, I'll have
her executed.  It's regrettable,  but new consorts  are easier  to get
than new fortresses  and maybe the next one will  pay attention at the
orientation meeting." <http://www.eviloverlord.com/>

pgsql-general by date:

Previous
From: Alan Hodgson
Date:
Subject: Re: triggers and TriggerData
Next
From: "Simon Riggs"
Date:
Subject: Re: [HACKERS] Autovacuum Improvements