Praveen Kumar (TUV) praveen.k at renaissance-it.com
Fri Dec 21 01:23:00 PST 2007
Hello,
Plz follow below mentioned steps if you have your setup on linux.
1. Connect as root user in your systems where you have subscriber and
publisher.
2. Stop slony process in subscriber and publisher side by using command
-->killall slon
3. su - postgres
4. psql <<database name>> (Mention your database where where you have
subscriber and publisher ) here you will 
   enter in sql prompt)
5. \dn   ( from this command you will find the schema name in your
database and in next command you need
   schema name which is mentioned with _(underscore)in schema list)
6. drop schema _<<cluster_name>> cascade ; ( here <<cluster_name>> is
schema name with _( underscore) in 
   schema list);
 


Praveen Malik | DBA - Delivery
E-mail: praveen.k at renaissance-it.com | Extn: 1607
 


-----Original Message-----
From: slony1-general-bounces at lists.slony.info
[mailto:slony1-general-bounces at lists.slony.info] On Behalf Of
slony1-general-request at lists.slony.info
Sent: Thursday, December 20, 2007 11:22 PM
To: slony1-general at lists.slony.info
Subject: Slony1-general Digest, Vol 10, Issue 29

Send Slony1-general mailing list submissions to
	slony1-general at lists.slony.info

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.slony.info/mailman/listinfo/slony1-general
or, via email, send a message with subject or body 'help' to
	slony1-general-request at lists.slony.info

You can reach the person managing the list at
	slony1-general-owner at lists.slony.info

When replying, please edit your Subject line so it is more specific than
"Re: Contents of Slony1-general digest..."


Today's Topics:

   1. Dropping a replication set? (Glyn Astill)
   2. Adding a new table to the replication-Question (Josh Harrison)
   3. Re: Adding a new table to the replication-Question (Glyn Astill)
   4. Re: Adding a new table to the replication-Question (Josh Harrison)
   5. Re: questions about slon_tools.conf (Vivek Khera)
   6. Re: Applying schema changes in slony (Andrew Sullivan)
   7. Re: Dropping a replication set? (Glyn Astill)


----------------------------------------------------------------------

Message: 1
Date: Thu, 20 Dec 2007 12:20:38 +0000 (GMT)
From: Glyn Astill <glynastill at yahoo.co.uk>
Subject: [Slony1-general] Dropping a replication set?
To: slony1-general at lists.slony.info
Message-ID: <387498.58861.qm at web25802.mail.ukl.yahoo.com>
Content-Type: text/plain; charset=iso-8859-1

Hi people,

I setup a slony replication set for a table and subscribed my a node to
it. However in the slony log the subscriber shows :

2007-12-20 11:50:38 GMT ERROR  remoteWorkerThread_1: node -1 not found
in runtime configuration
2007-12-20 11:50:38 GMT WARN   remoteWorkerThread_1: data copy for
set 3 failed - sleep 15 seconds

I have no idea why this error has come about, the table I put in the
replication set exists on both the publisher and subscriber.

What I wanted to do was just drop the replication set from the publisher
and subscriber and try setting it up again.

I've done most of my setup using pgAdminIII, and it doesn't seem to have
an option to drop the set. I did at one point manage to drop the set
from the publisher, but it remained on the subscriber and I couldn't
drop it. So I recreated it on the publisher to see if it'd help - to no
avail and now I don't have the option to drop either.

Could someone tell me how I'd go about dropping it from both the
subscriber and the publisher?

A pointer to a guide to doing the stuff pgAdmin does manually might be a
help too.

Thanks
Glyn 


      ___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try
it now.
http://uk.answers.yahoo.com/ 



------------------------------

Message: 2
Date: Thu, 20 Dec 2007 09:33:49 -0500
From: "Josh Harrison" <joshques at gmail.com>
Subject: [Slony1-general] Adding a new table to the
	replication-Question
To: slony1-general at lists.slony.info
Message-ID:
	<8d89ea1d0712200633i7d64783br37fdb13f6b054192 at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi
I already have a set replicating properly   . This is the  script I used
for
initializing the first cluster
        cluster name =3Dslony_example;
        node 1 admin conninfo =3D 'dbname=3D$MASTERDBNAME
host=3D$MASTERHOST user=3D$REPLICATIONUSER';
        node 2 admin conninfo =3D 'dbname=3D$SLAVEDBNAME
host=3D$SLAVEHOST user=3D$REPLICATIONUSER';
        init cluster ( id=3D1, comment =3D 'Master Node');
        create set (id=3D1, origin=3D1, comment=3D'All rmrs tables');
        set add table (set id=3D1, origin=3D1, id=3D2, fully qualified
name=  =3D '
public.a_method', comment=3D'a_method table');
         .....
        store node (id=3D2, comment =3D 'Slave node');
        store path (server =3D 1, client =3D 2,
conninfo=3D'dbname=3D$MASTE= RDBNAME host=3D$MASTERHOST
user=3D$REPLICATIONUSER');
        store path (server =3D 2, client =3D 1,
conninfo=3D'dbname=3D$SLAVE= DBNAME host=3D$SLAVEHOST
user=3D$REPLICATIONUSER');

   Now I want to add 2 tables dummy1 and dummy2 to the cluster. I had
created the tables using 'execute script' and the tables now exist in
the master and slave node. Now to add these 2 tables to the replication
set I try to run this script
        cluster name =3Dslony_example;
        node 1 admin conninfo =3D 'dbname=3D$MASTERDBNAME
host=3D$MASTERHOST user=3D$REPLICATIONUSER';
        node 2 admin conninfo =3D 'dbname=3D$SLAVEDBNAME
host=3D$SLAVEHOST user=3D$REPLICATIONUSER';
        create set (id=3D45, origin=3D1, comment=3D'All rmrs tables');
        set add table (set id=3D45, origin=3D1, id=3D46, fully qualified
na= me =3D '
public.dummy1', comment=3D'dummy1 table');
       set add table (set id=3D45, origin=3D1, id=3D47, fully qualified
nam= e =3D '
public.dummy2', comment=3D'dummy2 table');
       subscribe set(id=3D45, provider=3D1,receiver=3D2,forward=3Dno);
       merge set(id=3D1,add id=3D45, origin=3D1);

But I get this error. What am I doing wrong here?

<stdin>:36: PGRES_FATAL_ERROR select "_slony_example".storeSet(45, 'All
example tables');  - ERROR:  duplicate key violates unique constraint
"sl_set-pkey"
CONTEXT:  PL/pgSQL function "storeset" line 13 at SQL statement

Thanks
josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.slony.info/pipermail/slony1-general/attachments/20071220/=
e4b95e15/attachment-0001.htm

------------------------------

Message: 3
Date: Thu, 20 Dec 2007 14:55:14 +0000 (GMT)
From: Glyn Astill <glynastill at yahoo.co.uk>
Subject: Re: [Slony1-general] Adding a new table to the
	replication-Question
To: Josh Harrison <joshques at gmail.com>,
	slony1-general at lists.slony.info
Message-ID: <412263.2217.qm at web25811.mail.ukl.yahoo.com>
Content-Type: text/plain; charset=iso-8859-1

I used pgAdmin to set up my sets, so I guess I'm missing the intricate
detail here.

However in pgAdmin to add another table to a replication set I have to
create a new set, subscribe the slaves and then merge the sets.

I presume you have to go through the same new set -> merge sets process.

Glyn
--- Josh Harrison <joshques at gmail.com> wrote:

> Hi
> I already have a set replicating properly   . This is the  script I
> used for
> initializing the first cluster
>         cluster name =slony_example;
>         node 1 admin conninfo = 'dbname=$MASTERDBNAME host=$MASTERHOST

> user=$REPLICATIONUSER';
>         node 2 admin conninfo = 'dbname=$SLAVEDBNAME host=$SLAVEHOST 
> user=$REPLICATIONUSER';
>         init cluster ( id=1, comment = 'Master Node');
>         create set (id=1, origin=1, comment='All rmrs tables');
>         set add table (set id=1, origin=1, id=2, fully qualified name 
> = '
> public.a_method', comment='a_method table');
>          .....
>         store node (id=2, comment = 'Slave node');
>         store path (server = 1, client = 2, 
> conninfo='dbname=$MASTERDBNAME host=$MASTERHOST 
> user=$REPLICATIONUSER');
>         store path (server = 2, client = 1, 
> conninfo='dbname=$SLAVEDBNAME host=$SLAVEHOST user=$REPLICATIONUSER');
> 
>    Now I want to add 2 tables dummy1 and dummy2 to the cluster. I had 
> created the tables using 'execute script' and the tables now exist in 
> the master and slave node. Now to add these 2 tables to the 
> replication set I try to run this script
>         cluster name =slony_example;
>         node 1 admin conninfo = 'dbname=$MASTERDBNAME host=$MASTERHOST

> user=$REPLICATIONUSER';
>         node 2 admin conninfo = 'dbname=$SLAVEDBNAME host=$SLAVEHOST 
> user=$REPLICATIONUSER';
>         create set (id=45, origin=1, comment='All rmrs tables');
>         set add table (set id=45, origin=1, id=46, fully qualified 
> name = '
> public.dummy1', comment='dummy1 table');
>        set add table (set id=45, origin=1, id=47, fully qualified name

> = '
> public.dummy2', comment='dummy2 table');
>        subscribe set(id=45, provider=1,receiver=2,forward=no);
>        merge set(id=1,add id=45, origin=1);
> 
> But I get this error. What am I doing wrong here?
> 
> <stdin>:36: PGRES_FATAL_ERROR select "_slony_example".storeSet(45, 
> 'All example tables');  - ERROR:  duplicate key violates unique 
> constraint "sl_set-pkey"
> CONTEXT:  PL/pgSQL function "storeset" line 13 at SQL statement
> 
> Thanks
> josh
> > _______________________________________________
> Slony1-general mailing list
> Slony1-general at lists.slony.info
> http://lists.slony.info/mailman/listinfo/slony1-general
> 



      __________________________________________________________
Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com



------------------------------

Message: 4
Date: Thu, 20 Dec 2007 09:59:59 -0500
From: "Josh Harrison" <joshques at gmail.com>
Subject: Re: [Slony1-general] Adding a new table to the
	replication-Question
To: "Glyn Astill" <glynastill at yahoo.co.uk>
Cc: slony1-general at lists.slony.info
Message-ID:
	<8d89ea1d0712200659y32cb8533jbb59338a3060b9b5 at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

On Dec 20, 2007 9:55 AM, Glyn Astill <glynastill at yahoo.co.uk> wrote:

> I used pgAdmin to set up my sets, so I guess I'm missing the intricate

> detail here.
>
> However in pgAdmin to add another table to a replication set I have to

> create a new set, subscribe the slaves and then merge the sets.
>
> I presume you have to go through the same new set -> merge sets 
> process.
>
> Yes. I do the same..create subscribe and merge. I somehow keep getting
this error. How do you create the table definition in pgadmin? Is
pgAdmin a better solution to manage slony?
josh

>
>      __________________________________________________________
> Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.slony.info/pipermail/slony1-general/attachments/20071220/=
602a0c58/attachment-0001.htm

------------------------------

Message: 5
Date: Thu, 20 Dec 2007 11:31:42 -0500
From: Vivek Khera <vivek at khera.org>
Subject: Re: [Slony1-general] questions about slon_tools.conf
To: Slony List <slony1-general at lists.slony.info>
Message-ID: <5E13E951-3AAC-4D23-820F-EF8B97DB1522 at khera.org>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes


On Dec 19, 2007, at 6:12 PM, Geoffrey wrote:

> As I understand it, if I'm replicating from one machine to another, I 
> must have identical slon_tools.conf files on both machines.

no, you need to change teh connection string so each slon connects to
its own server it is responsible for.

the slons can run on any box; they just connect as clients to postgres.
most people tend to run the associated slon on the same box as the
postgres server.



------------------------------

Message: 6
Date: Thu, 20 Dec 2007 12:20:38 -0500
From: Andrew Sullivan <ajs at crankycanuck.ca>
Subject: Re: [Slony1-general] Applying schema changes in slony
To: slony1-general at lists.slony.info
Message-ID: <20071220172038.GC4924 at crankycanuck.ca>
Content-Type: text/plain; charset=us-ascii

On Wed, Dec 19, 2007 at 09:37:24PM -0500, Josh Harrison wrote:
> In the production environment is this okay? Anyone had tried this? Are

> there

Basically, you have two choices in doing this:

1.  Schedule outages for upgrades.  If there's nothing else going on,
the schema changes should go through very quickly.

2.  Do some timing trickery.  There was a problem report just yesterday
or today that described how someone normally does this.  Basically, you
use the replica as a read-only system, stop the slons, perform the
EXECUTE SCRIPT on the origin, and then move your application back.
Start the slons and thereby allow the replica to catch up.  There are
potential gotchas about this; test your procedure carefully!

A




------------------------------

Message: 7
Date: Thu, 20 Dec 2007 17:52:02 +0000 (GMT)
From: Glyn Astill <glynastill at yahoo.co.uk>
Subject: Re: [Slony1-general] Dropping a replication set?
To: Glyn Astill <glynastill at yahoo.co.uk>,
	slony1-general at lists.slony.info
Message-ID: <546863.26737.qm at web25807.mail.ukl.yahoo.com>
Content-Type: text/plain; charset=iso-8859-1

Any takers?

--- Glyn Astill <glynastill at yahoo.co.uk> wrote:

> Hi people,
> 
> I setup a slony replication set for a table and subscribed my a node 
> to it. However in the slony log the subscriber shows :
> 
> 2007-12-20 11:50:38 GMT ERROR  remoteWorkerThread_1: node -1 not found

> in runtime configuration
> 2007-12-20 11:50:38 GMT WARN   remoteWorkerThread_1: data copy for
> set 3 failed - sleep 15 seconds
> 
> I have no idea why this error has come about, the table I put in the 
> replication set exists on both the publisher and subscriber.
> 
> What I wanted to do was just drop the replication set from the 
> publisher and subscriber and try setting it up again.
> 
> I've done most of my setup using pgAdminIII, and it doesn't seem to 
> have an option to drop the set. I did at one point manage to drop the 
> set from the publisher, but it remained on the subscriber and I 
> couldn't drop it. So I recreated it on the publisher to see if it'd 
> help - to no avail and now I don't have the option to drop either.
> 
> Could someone tell me how I'd go about dropping it from both the 
> subscriber and the publisher?
> 
> A pointer to a guide to doing the stuff pgAdmin does manually might be

> a help too.
> 
> Thanks
> Glyn
> 
> 
>       ___________________________________________________________
> Yahoo! Answers - Got a question? Someone out there knows the answer. 
> Try it now.
> http://uk.answers.yahoo.com/
> 
> _______________________________________________
> Slony1-general mailing list
> Slony1-general at lists.slony.info
> http://lists.slony.info/mailman/listinfo/slony1-general
> 



Glyn Astill



      __________________________________________________________
Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com



------------------------------

_______________________________________________
Slony1-general mailing list
Slony1-general at lists.slony.info
http://lists.slony.info/mailman/listinfo/slony1-general


End of Slony1-general Digest, Vol 10, Issue 29
**********************************************


More information about the Slony1-general mailing list