Wed Jun 22 23:41:48 PDT 2011
- Previous message: [Slony1-general] postgres slony-i master node tables can't be written after running for few days
- Next message: [Slony1-general] postgres slony-i master node tables can't be written after running for few days
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
I connect to the both master and slave nodes directly.
I already re-configure slony, and it is working properly now
for master node , the triggers are:
<----------------------------------------------------------------------------------
Indexes:
"euprofiles_pkey" PRIMARY KEY, btree (id)
Triggers:
_profile_propagation_logtrigger AFTER INSERT OR DELETE OR UPDATE ON
euprofiles FOR EACH ROW EXECUTE PROCEDURE
_profile_propagation.logtrigger('_profile_propagation', '2', 'k')
Disabled triggers:
_profile_propagation_denyaccess BEFORE INSERT OR DELETE OR UPDATE ON
euprofiles FOR EACH ROW EXECUTE PROCEDURE
_profile_propagation.denyaccess('_profile_propagation')
---------------------------------------------------------------------------------->
for slave node, the triggers are:
<----------------------------------------------------------------------------------
Indexes:
"euprofiles_pkey" PRIMARY KEY, btree (id)
Triggers:
_profile_propagation_denyaccess BEFORE INSERT OR DELETE OR UPDATE ON
euprofiles FOR EACH ROW EXECUTE PROCEDURE
_profile_propagation.denyaccess('_profile_propagation')
Disabled triggers:
_profile_propagation_logtrigger AFTER INSERT OR DELETE OR UPDATE ON
euprofiles FOR EACH ROW EXECUTE PROCEDURE
_profile_propagation.logtrigger('_profile_propagation', '2', 'k')
---------------------------------------------------------------------------------->
I don't know how to reproduce the problem, just waiting it to happen
again. To give more information about how I setup slony, Following is my
scripts I used to configure slony
<----------------------------------------------------------------------------------
##
## Subscribe
##
subscribe(){
provider=$1
subscriber=$2
if test ${provider} -eq ${subscriber}
then
echo "provider and subscriber should be different"
return
fi
/export/home/tools/pgsql/current/bin/slonik <<EOF
include <preamble.sk>;
echo 'Subscribing ${subscriber} to ${provider}';
subscribe set (id=1,provider=$provider,receiver=$subscriber,forward=no);
sync(id=1);
wait for event (origin=$provider, confirmed=$subscriber, wait on=1);
echo 'Done';
EOF
}
##
## Add new node
##
addnode() {
new_node_id=$1
new_node_comment=$2
new_node_conn=$3
/export/home/tools/pgsql/current/bin/slonik <<EOF
include <preamble.sk>;
echo 'Adding new node ${new_node_id} ${new_node_comment}
${new_node_conn}';
store node(id=${new_node_id}, comment='${new_node_comment}', event
node=1);
store path(server=1, client=${new_node_id}, conninfo='host=168.198.1.92
port=5432 dbname=ops_db user=scadmin password=scadmin0');
store path(server=${new_node_id}, client=1,
conninfo='${new_node_conn}');
echo 'done';
EOF
}
##
## initialize slony cluster
##
initcluster() {
/export/home/tools/pgsql/current/bin/slonik <<EOF
include <preamble.sk>;
echo 'initializing cluster';
init cluster (id=1, comment='navigator');
create set (id=1, origin=1, comment='source tables');
set add table(set id=1, origin=1, id=1, fully qualified
name='public.code_descs', comment='source table #1',
key='code_descs_pkey');
set add table(set id=1, origin=1, id=2, fully qualified
name='public.euprofiles', comment='source table #2',
key='euprofiles_pkey');
set add table(set id=1, origin=1, id=3, fully qualified
name='public.glob_confs', comment='source table #2',
key='glob_confs_pkey');
EOF
}
##
## Dispatch command
##
if [[ $1 = "sub" ]]; then
if [[ $# -lt 3 ]]; then
echo "usage: $0 sub <provider node id> <subscriber node
id> ";
exit 0;
fi
subscribe $2 $3;
elif [[ $1 = "add" ]]; then
if [[ $# -lt 4 ]]; then
echo "usage: $0 add <new node id> <new node comment>
<new node connection>";
exit 0;
fi
addnode $2 "$3" "$4";
elif [[ $1 = "init" ]]; then
initcluster
else
echo "command not valid, usage: $0 < init | sub | add >";
fi
---------------------------------------------------------------------------------->
I run the the following two commands on master side
> ./slony_admin.sh init
> ./slony_admin.sh add 2 iabox "host=168.198.1.46 port=5432
dbname=igops.ia.db user=scadmin password=scadmin0"
and the following one commnds on the slave node
> ./slony_admin.sh sub 1 2
That's all what I did.
Thanks
Rodney
On Thu, 2011-06-23 at 08:21 +0200, "Stéphane A. Schildknecht" wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>
> Le 23/06/2011 06:52, rodney a écrit :
> > Hi all
> >
> > I set up slony to replicate 3 tables from one opensuse pc (master node)
> > to another opensuse pc (slave node). It works well at first. After
> > running for few days, it suddenly come out the error message of -
> >
> > ERROR: Slony-I: Table euprofiles is replicated and cannot be modified on
> > a subscriber node - role=0
>
> Could you execute \d euprofiles on every node and give us the result?
>
> Do you have any message in slony logfile?
>
> >
> > euprofiles is one of the tables being replicated by slony.
> >
> > I know that this message may occur if you are trying to write to the
> > table of slave node. But here I am writing to master node only.
>
> For some reason, it now thinks the table is on the slave.
> How do you connect to your databases ? Direct connection? Through a virtual IP?
>
> Is there any auto-magical switch in your infrastructure?
>
> Regards,
> - --
> Stéphane Schildknecht
> Loxodata
> Contact régional PostgreSQL
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk4C22cACgkQA+REPKWGI0Ep/wCgwI9yUvPcrWAyKYybSVQ7f9hG
> SvkAoIiD7nMi4uFxaYyJDiI5i90lsP1o
> =coBk
> -----END PGP SIGNATURE-----
> _______________________________________________
> Slony1-general mailing list
> Slony1-general at lists.slony.info
> http://lists.slony.info/mailman/listinfo/slony1-general
--
rodney <yl.wang at invantest.com>
- Previous message: [Slony1-general] postgres slony-i master node tables can't be written after running for few days
- Next message: [Slony1-general] postgres slony-i master node tables can't be written after running for few days
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list