Home > Archive > Slony1 PostgreSQL Replication > June 2005 > RE: ERROR: namespace "_cluster" already exists









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: ERROR: namespace "_cluster" already exists
Tang, Jason

2005-06-15, 7:24 am

Hi there

Try adapting the below snippet for your environment. I currently have a script that contains this which I use to 'start again from square one'

slonik <_EOF_
cluster name = $CLUSTER;

node 1 admin conninfo = 'dbname=$DBNAME1 host=$HOST1 user=$SLONY_USER';
node 2 admin conninfo = 'dbname=$DBNAME2 host=$HOST2 user=$SLONY_USER';
uninstall node ( id = 1 );
uninstall node ( id = 2 );
_EOF_

-----Original Message-----
From: slony1-general-bounces- AuKwsB3Fm+ugFIWk8tvy
RWD2FQJk+8+b@public.gmane.org [mailto:slony1-general-bounces- AuKwsB3Fm+ugFIWk8tvy
RWD2FQJk+8+b@public.gmane.org] On Behalf Of Stéphane Pétrot
Sent: 15 June 2005 10:43
To: slony1-general- AuKwsB3Fm+ugFIWk8tvy
RWD2FQJk+8+b@public.gmane.org
Subject: [Slony1-general] ERROR: namespace "_cluster" already exists indatabase of node 1

Hello,

I have run once the slony_setup.sh script that configures nodes. For me it looks like (the begining of script):

#!/bin/sh

PGBINDIR=/usr/lib/postgresql
/bin
export PGBINDIR
PATH="$PGBINDIR:$PATH"
export PATH

slonik <<_EOF_
# ----
define asterix_node 1;
define obelix_node 2;
define idefix_node 3;

# ----
# This defines which namespace the replication system uses
# ----
cluster name = $CLUSTERNAME;

# ----
# Admin conninfo's are used by the slonik program to connect
# to the node databases. So these are the PQconnectdb arguments
# that connect from the administrators workstation (where
# slonik is executed).
# first drop the create nodes
# ----
#drop node ( id = @asterix_node);
#drop node (id = @obelix_node);
#drop node (id = @idefix_node);
node 1 admin conninfo = 'dbname=$MASTERDBNAM
E host=$MLOCALE user=$REPLICATIONUSE
R';
#node @obelix_node admin conninfo = 'dbname=$SLAVEDBNAME
host=$MDISTANTE user=$REPLICATIONUSE
R';
node 3 admin conninfo = 'dbname=$SLAVEDBNAME
host=$MDISTANTE2 user=$REPLICATIONUSE
R';

# ----
# Initialize the first node. The id must be 1.
# This creates the schema "_test1" containing all replication
# system specific database objects.
# ----
init cluster ( id = @asterix_node, comment = 'Master Node 1' );
[...]


Then I had an error about primary_key that was not found. After making correction, I try to run the script again, but I got the error :
[color=darkred]

Then I have commented out the line init cluster ( id = @asterix_node, comment = 'Master Node 1' ); and add the lines "drop node (id=@asterix_node);..." but I got another error : <stdin>:18: ERROR: syntax error at or near drop

Could you please tell me how to re-initialize the whole process (cluster, node definitions, etc...) ? I was looking for some tables dealing about slony (table like sl_node) but I was not able to find it. Where are they?

Thanks...
Stéphane

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com