Peter Geoghegan peter.geoghegan86 at gmail.com
Mon Jul 13 14:06:17 PDT 2009
Hello,

I'm attempting to get Slony 2.0.2 working on windows Vista with
PostgreSQL 8.4.0. I'm using Hiroshi Saito's binary package (
http://developer.pgadmin.org/~hiroshi/Slony-I/ ), because there
apparently isn't a package available from a mainstream source, such as
the application stack builder, as with previous releases. This
apparently forces me to write slonik scripts, because PgAdmin 1.10
refuses to acknowledge the presence of the Slony SQL scripts from
Hiroshi's package, and I got away with just using PgAdmin3 in the
past.

After creating the Slony-I service and initialising engines (though
not the service), I hacked away at a slonik script in an effort to
initialise simple replication between one master and one slave of one
set, using Hiroshi's notes and the Slony documentation's "Replicating
your first database" section as a guide. This is what I've come up
with:

CLUSTER NAME = my_cluster;

NODE 1 ADMIN CONNINFO = 'host=127.0.0.1 dbname=master_db user=postgres
password=passwd';
NODE 2 ADMIN CONNINFO = 'host=10.0.0.67 dbname=slave_db user=postgres
password=passwd'';
init cluster ( id=1, comment = 'Master Node');

create set (id=1, origin=1, comment='my set');

set add table (set id=1, origin=1, id=1, fully qualified name =
'public.table_one', comment=.table_one');
# ... snip ...
set add table (set id=1, origin=1, id=16, fully qualified name =
'public.table_sixteen', comment=table_sixteen');


store node (id=2, comment = 'Slave node');

store path (server = 1, client = 2, conninfo='dbname=master_db
host=127.0.0.1 user=postgres password=passwd');
store path (server = 2, client = 1, conninfo='dbname=slave_db
host=10.0.0.67 user=postgres password=passwd');


SUBSCRIBE SET ( ID=1, PROVIDER=1, RECEIVER=2, FORWARD=NO );

Here's the output:

c:\Program Files\PostgreSQL\8.4\bin>slonik ./init_slonik.txt
./init_slonik.txt:29: Error: require EVENT NODE
./init_slonik.txt:29: Error: require No admin conninfo provided for node -1

I've googled the problem, and someone posted the same problem to the
mailing list a few months back. Brad Nicholson responded:

"Several Slonik commands assume the there is a node 1 and and try to send
the event through that.  If you don't have a node 1, the command will
fail.  These commands give you the option to specify a different node to
send the event through (event node).  Specify a node that you do have in
the cluster and it should work."

Chris Browne added:

"Brad's comments describe things for versions 1.0 thru 1.2; in 2.0, for
commands that need an event node, it is no longer optional to specify it.
If you do not indicate an event node, the slonik command will complain as
shown above, and fail, as shown."

Don't I have a node one, because I called init cluster above with id
1? How can the problem be fixed?

Regards,
Peter Geoghegan


More information about the Slony1-general mailing list