Home > Archive > Slony1 PostgreSQL Replication > September 2005 > switchover









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 switchover
Sebastian Kühner

2005-09-08, 8:24 pm

Hello,

I'm trying to execute the following swithcover.sh script:

#!/bin/bash
CLUSTER=sql_cluster5

H1=192.168.1.225
H2=192.168.1.223
U=postgres
DB1=contact
DB2=contact
/usr/local/pgsql/bin/slonik << _END_
cluster name=$CLUSTER;
lock set (id=1, origin=1);
wait for event (origin=1, confirmed=2);
move set (id=1, old origin=1, new origin=2);
wait for event (origin = 1, confirmed = 2);
_END_


....and I'm getting the following error:

<stdin>:2: ERROR: syntax error at or near lock

That means that slonik doesn't recognize the "lock" command?

Thanks!

Sebastian
Christopher Browne

2005-09-08, 8:24 pm

Sebastian K=FChner <skuehner- W+yTvUamF4rQT0dZR+Al
fA@public.gmane.org> writes:
> I'm trying to execute the following swithcover.sh script:
>
> #!/bin/bash
> CLUSTER=3Dsql_cluste
r5
> H1=3D192.168.1.225
> H2=3D192.168.1.223
> U=3Dpostgres
> DB1=3Dcontact
> DB2=3Dcontact
> /usr/local/pgsql/bin/slonik << _END_
> cluster name=3D$CLUSTER;
> lock set (id=3D1, origin=3D1);
> wait for event (origin=3D1, confirmed=3D2);
> move set (id=3D1, old origin=3D1, new origin=3D2);
> wait for event (origin =3D 1, confirmed =3D 2);
> _END_
>
>
> ...and I'm getting the following error:
>
> <stdin>:2: ERROR: syntax error at or near lock
>
> That means that slonik doesn't recognize the "lock" command?


I think that the problem is that you haven't specified any "node admin
conninfo" entries in the preamble.

Consider: You have shell variables H1, H2, DB1, and DB2.

But those values are found nowhere in the script that is submitted to
slonik. So slonik has no idea how to communicate with your databases.
--=20
output =3D ("cbbrowne" "@" "ca.afilias.info")
<http://dev6.int.libertyrms.com/>
Christopher Browne
(416) 673-4124 (land)
Sebastian Kühner

2005-09-08, 8:24 pm

Hi!

Sorry, I was blind! Double thanks!! Now it works...

Sebastian


----- Original Message -----=20
From: "Christopher Browne" <cbbrowne-swQf4SbcV9C7WVzo/KQ3Mw@public.gmane.org>
To: "Sebastian K=FChner" <skuehner- W+yTvUamF4rQT0dZR+Al
fA@public.gmane.org>
Cc: <slony1-general- AuKwsB3Fm+ugFIWk8tvy
RWD2FQJk+8+b@public.gmane.org>
Sent: Thursday, September 08, 2005 4:02 PM
Subject: Re: [Slony1-general] switchover


Sebastian K=FChner <skuehner- W+yTvUamF4rQT0dZR+Al
fA@public.gmane.org> writes:
> I'm trying to execute the following swithcover.sh script:
>
> #!/bin/bash
> CLUSTER=3Dsql_cluste
r5
> H1=3D192.168.1.225
> H2=3D192.168.1.223
> U=3Dpostgres
> DB1=3Dcontact
> DB2=3Dcontact
> /usr/local/pgsql/bin/slonik << _END_
> cluster name=3D$CLUSTER;
> lock set (id=3D1, origin=3D1);
> wait for event (origin=3D1, confirmed=3D2);
> move set (id=3D1, old origin=3D1, new origin=3D2);
> wait for event (origin =3D 1, confirmed =3D 2);
> _END_
>
>
> ...and I'm getting the following error:
>
> <stdin>:2: ERROR: syntax error at or near lock
>
> That means that slonik doesn't recognize the "lock" command?


I think that the problem is that you haven't specified any "node admin
conninfo" entries in the preamble.

Consider: You have shell variables H1, H2, DB1, and DB2.

But those values are found nowhere in the script that is submitted to
slonik. So slonik has no idea how to communicate with your databases.
--=20
output =3D ("cbbrowne" "@" "ca.afilias.info")
<http://dev6.int.libertyrms.com/>
Christopher Browne
(416) 673-4124 (land)
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