Bug 169

Summary: Add common representation for administrative DB connections
Product: Slony-I Reporter: Christopher Browne <cbbrowne>
Component: core scriptsAssignee: Slony Bugs List <slony1-bugs>
Status: NEW ---    
Severity: enhancement CC: slony1-bugs
Priority: low    
Version: devel   
Hardware: All   
OS: All   

Description Christopher Browne 2010-12-03 12:08:02 UTC
There appears to be some value in trying to have a common representation
of administrative connection data.  This was brought up in recent
brainstorming.[1]

We know of several places where this data is needed, and presently,
there's no non-clumsy way to reuse it.

1.  When running Slonik scripts, you need ADMIN CONNINFO[2] statements in
the preamble to indicate how to connect to all the nodes.

2.  There is a script that tests the state of a cluster.[3]  It presently
oversimplifies by pulling data configured using STORE PATH.[4]

This is not really correct, in general, because the connections used for
central management mayn't be the same as those used for slons.

3.  We wish to add additional scripts to help analyze cluster states.  A
better, common way of storing this DB connection information would make
it easier to keep all these connections straight.
There appears to be some value in trying to have a common representation
of administrative connection data.  This was brought up in recent
brainstorming.[1]

We know of several places where this data is needed, and presently,
there's no non-clumsy way to reuse it.

1.  When running Slonik scripts, you need ADMIN CONNINFO[2] statements in
the preamble to indicate how to connect to all the nodes.

2.  There is a script that tests the state of a cluster.[3]  It presently
oversimplifies by pulling data configured using STORE PATH.[4]

This is not really correct, in general, because the connections used for
central management mayn't be the same as those used for slons.

3.  We wish to add additional scripts to help analyze cluster states.  A
better, common way of storing this DB connection information would make
it easier to keep all these connections straight.

4.  ALTPERL tools do similar to #2 above [5].

5.  slony-ctl (a Bash-based equivalent to "altperl") does similar to
"altperl".  See bases.h[6]

Effectively the only "correct" representation that exists, at present,
is the one in Slonik preambles (#1).

Footnotes: 
[1]  http://wiki.postgresql.org/wiki/SlonyBrainstorming#Common_Admin_Conninfo

[2]  http://slony.info/documentation/2.0/admconninfo.html

[3]  http://slony.info/documentation/2.0/monitoring.html#test_slony_state

[4]  http://slony.info/documentation/2.0/stmtstorepath.html

[5]  http://git.postgresql.org/gitweb?p=slony1-engine.git;a=blob_plain;f=tools/altperl/slon_tools.conf-sample;hb=HEAD

[6]  http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/slony1-ctl/slony-ctl/etc/bases.h
4.  ALTPERL tools do similar to #2 above [5].

5.  slony-ctl (a Bash-based equivalent to "altperl") does similar to
"altperl".  See bases.h[6]

Footnotes: 
[1]  http://wiki.postgresql.org/wiki/SlonyBrainstorming#Common_Admin_Conninfo

[2]  http://slony.info/documentation/2.0/admconninfo.html

[3]  http://slony.info/documentation/2.0/monitoring.html#test_slony_state

[4]  http://slony.info/documentation/2.0/stmtstorepath.html

[5]  http://git.postgresql.org/gitweb?p=slony1-engine.git;a=blob_plain;f=tools/altperl/slon_tools.conf-sample;hb=HEAD

[6]  http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/slony1-ctl/slony-ctl/etc/bases.h