Fri Sep 29 10:16:12 PDT 2006
- Previous message: [Slony1-general] error during slonik script
- Next message: [Slony1-general] error during slonik script
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 9/29/06, Steven Mocking <mocking at textkernel.nl> wrote:
>
> After getting slony to run succesfully on one server with simply two
> local databases as master and slave, the other one appears to be more of
> a challenge.
>
> This is my slonik-invoking shell script:
>
> ---
> #!/bin/sh
>
> # Location of pgsql and Slony-I binaries
> PGBIN=/usr/local/pgsql/bin
> # Name of our cluster
> CLUSTER=tksync
> # Master DB
> MASTERDBNAME=syncm
> # Slave DB
> SLAVEDBNAME=syncs
> # Master password
> MPASSWORD=xxxxxx
> # Slave pass
> SPASSWORD=xxxxxx
> # Primary host
> MASTERHOST="127.0.0.1"
> SLAVEHOST="127.0.0.1"
> # user
> REPLICATIONUSER=slony
>
> PATH=$PGBIN:$PATH
>
>
> slonik <<_EOF_
> # Define the namespace the replication system uses
> cluster name = $CLUSTER;
>
> #--
> # admin conninfo's are used by slonik to connect to the nodes one for
> each
> # node on each side of the cluster, the syntax is that of PQconnectdb in
> # the C-API
> # --
> node 1 admin conninfo = 'dbname=$MASTERDBNAME host=$MASTERHOST
> user=$REPLICATIONUSER password=$MPASSWORD';
> node 2 admin conninfo = 'dbname=$SLAVEDBNAME host=$SLAVEHOST
> user=$REPLICATIONUSER password=$SPASSWORD';
>
> #--
> # init the first node. Its id MUST be 1. This creates the schema
> # _$CLUSTER containing all replication system specific database
> # objects.
>
> #--
> init cluster ( id=1, comment = 'Master Node');
>
> #--
> # Because the history table does not have a primary key or other unique
> # constraint that could be used to identify a row, we need to add one.
> # The following command adds a bigint column named
> # _Slony-I_$CLUSTER_rowID to the table. It will have a default value
> # of nextval('_$CLUSTER.s1_rowid_seq'), and have UNIQUE and NOT NULL
> # constraints applied. All existing rows will be initialized with a
> # number
> #--
> # table add key (node id = 1, fully qualified name = 'public.poeppie');
>
> #--
> # Slony-I organizes tables into sets. The smallest unit a node can
> # subscribe is a set. The following commands create one set containing
> # all 4 pgbench tables. The master or origin of the set is node 1.
> #--
> create set (id=1, origin=1, comment='All synctest tables');
>
> set add table (set id=1, origin=1, id=1, fully qualified name =
> 'public.poeppie', comment='poeppie');
> # set add table (set id=1, origin=1, id=2, fully qualified name =
> 'public.branches', comment='branches table');
> # set add table (set id=1, origin=1, id=3, fully qualified name =
> 'public.tellers', comment='tellers table');
> # set add table (set id=1, origin=1, id=4, fully qualified name =
> 'public.history', comment='history table', key = serial);
>
> # set add table (set id=1, origin=1, id=4, fully qualified name =
> 'public.history', comment='history table', key = serial);
>
> #--
> # Create the second node (the slave) tell the 2 nodes how to connect to
> # each other and how they should listen for events.
> #--
>
> store node (id=2, comment = 'Slave node');
> store path (server = 1, client = 2, conninfo='dbname=$MASTERDBNAME
> host=$MASTERHOST user=$REPLICATIONUSER password=$MPASSWORD');
> store path (server = 2, client = 1, conninfo='dbname=$SLAVEDBNAME
> host=$SLAVEHOST user=$REPLICATIONUSER password=$SPASSWORD');
> store listen (origin=1, provider = 1, receiver =2);
> store listen (origin=2, provider = 2, receiver =1);
> _EOF_
>
> ---
>
> This is identical to the variant which worked perfectly on another
> server. And I can login to both master and slave databases on the host
> with the user/pass in the script.
>
> But when I try to run it:
>
> ---
> user at host ~/slony$ ./mkSlonyConfig.sh
> <stdin>:18: loading of file /usr/local/pgsql/share//xxid.v73.sql:
> PGRES_FATAL_ERROR ERROR: current transaction is aborted, queries
> ignored until end of transaction block
> ERROR: current transaction is aborted, queries ignored until end of
> transaction block
> <stdin>:18: ERROR: no admin conninfo for node 134584768
> ---
>
> A crucial difference might be that the first server ran postgresql 8.1
> and the second 7.3 (7.3.2 to be exact). Also, the second was compiled
> from source.
>
> What am I doing wrong?
The problem is that postgresql 7.3.2 isn't supported by slony-I, because
it's lacking namespace support. The minimum requirement is postgresql 7.3.3.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gborg.postgresql.org/pipermail/slony1-general/attachments/20060929/21eccbd3/attachment.html
- Previous message: [Slony1-general] error during slonik script
- Next message: [Slony1-general] error during slonik script
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list