Steve Singer ssinger at ca.afilias.info
Fri Nov 19 12:30:26 PST 2010
On the theme of improving the usability of slonik; there are a few 
things that I feel can be done towards this.

1.  You should be able to specify a preamble file on the command lline.

ie

slonik -p /etc/slonik/mycluster.sl.

All slonik scripts start with

--
cluster name=foo;
node 1 admin conninfo='....';
node 2 admin conninfo='....';

------

This way you can have your standard preamble laying around somewhere so 
each time you invoke slonik you can actually start issuing useful 
commands.  I realize that you do an 'include' as soon as you start 
slonik but sometimes that is awkward.

Also if you want to write slonik scripts that can be tested (as in) in a 
test environment before applying them to production it would be easier 
if you just passed the proper preamble file on the command line versus 
having to edit the includes of the script.


2. You should be able to bulk add a bunch of tables to a set.

Most of the time when I add setup a new system for replication I write a 
shell script that queries pg_table and generates a series of 'set add 
table(...' commands.   I shouldn't need to do this.

I propose we let slonik support something like

set add table(set id=1, tables="public.*", origin=1);
set add table(set id=1, tables="billing.(!password)",origin=1);


where posix regular expressions can be used to patch the tables to add 
to the set.

3. Fewer non-default options to 'set add table.'

Specifically slonik should select an appropriate id for the table and 
figure out where the origin is.  Most people don't try adding tables to 
their replication sets while a move set is in progress.


Do other others agree that these features are worth having?

Steve



More information about the Slony1-general mailing list