From cbbrowne at lists.slony.info Mon Apr 7 12:24:04 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Mon Apr 7 12:24:06 2008
Subject: [Slony1-commit] slony1-engine/doc/adminguide maintenance.sgml
Message-ID: <20080407192404.8AFA7290DD2@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/doc/adminguide
In directory main.slony.info:/tmp/cvs-serv21526
Modified Files:
maintenance.sgml
Log Message:
Change query that populates pg_catalog.pg_autovacuum to reflect recent version of schema...
Per Jeff Frost
Index: maintenance.sgml
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/doc/adminguide/maintenance.sgml,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** maintenance.sgml 24 Mar 2008 15:57:34 -0000 1.30
--- maintenance.sgml 7 Apr 2008 19:24:02 -0000 1.31
***************
*** 112,119 ****
The following query will populate
pg_catalog.pg_autovacuum with suitable configuration
! information: insert into pg_catalog.pg_autovacuum (vacrelid,
! enabled) select oid, 'f' from pg_catalog.pg_class where relnamespace =
! (select oid from pg_namespace where nspname = '_' || 'MyCluster') and
! relhasindex;
Watchdogs: Keeping Slons Running
--- 112,117 ----
The following query will populate
pg_catalog.pg_autovacuum with suitable configuration
! information: INSERT INTO pg_catalog.pg_autovacuum (vacrelid, enabled, vac_base_thresh, vac_scale_factor, anl_base_thresh, anl_scale_factor, vac_cost_delay, vac_cost_limit, freeze_min_age, freeze_max_age) SELECT oid, 'f', -1, -1, -1, -1, -1, -1, -1, -1 FROM pg_catalog.pg_class WHERE relnamespace = (SELECT OID FROM pg_namespace WHERE nspname = '_' || 'MyCluster') AND relhasindex;
!
Watchdogs: Keeping Slons Running
From cbbrowne at lists.slony.info Mon Apr 7 13:47:50 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Mon Apr 7 13:47:52 2008
Subject: [Slony1-commit] slony1-engine/doc/adminguide testbed.sgml
Message-ID: <20080407204750.B6B57290E37@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/doc/adminguide
In directory main.slony.info:/tmp/cvs-serv28100/doc/adminguide
Modified Files:
testbed.sgml
Log Message:
Allow setting TMPDIR to indicate a path where log files for the test will
be placed. As suggested by Nirbhay Choubey
Index: testbed.sgml
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/doc/adminguide/testbed.sgml,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** testbed.sgml 28 Jan 2008 19:33:10 -0000 1.16
--- testbed.sgml 7 Apr 2008 20:47:48 -0000 1.17
***************
*** 147,150 ****
--- 147,159 ----
+ TMPDIR
+
+ By default, the tests will generate their output in
+ /tmp, /usr/tmp, or
+ /var/tmp, unless you set your own value for this
+ environment variable.
+
+
+
SLTOOLDIR
From cbbrowne at lists.slony.info Mon Apr 7 13:47:50 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Mon Apr 7 13:47:53 2008
Subject: [Slony1-commit] slony1-engine/tests run_test.sh
Message-ID: <20080407204750.C2947290E47@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/tests
In directory main.slony.info:/tmp/cvs-serv28100/tests
Modified Files:
run_test.sh
Log Message:
Allow setting TMPDIR to indicate a path where log files for the test will
be placed. As suggested by Nirbhay Choubey
Index: run_test.sh
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/tests/run_test.sh,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** run_test.sh 9 Jan 2008 20:47:48 -0000 1.20
--- run_test.sh 7 Apr 2008 20:47:48 -0000 1.21
***************
*** 256,260 ****
$pgbindir/createdb -O $user -h $host -U $user -p $port --encoding $ENCODING $db 1> ${mktmp}/createdb.${originnode} 2> ${mktmp}/createdb.${originnode}
if [ $? -ne 0 ]; then
! err 3 "An error occured trying to $pgbindir/createdb -O $user -h $host -U $user -p $port --encoding $ENCODING $db, ${mktmp}/createdb.${originnode} for details"
fi
else
--- 256,260 ----
$pgbindir/createdb -O $user -h $host -U $user -p $port --encoding $ENCODING $db 1> ${mktmp}/createdb.${originnode} 2> ${mktmp}/createdb.${originnode}
if [ $? -ne 0 ]; then
! err 3 "An error occurred trying to $pgbindir/createdb -O $user -h $host -U $user -p $port --encoding $ENCODING $db, ${mktmp}/createdb.${originnode} for details"
fi
else
***************
*** 716,728 ****
}
case `uname` in
SunOS|AIX|MINGW32*)
! for i in /tmp /usr/tmp /var/tmp; do
! if [ -d $i ]; then
! tmpdir=$i
! break
! fi
! done
! if [ -z $tmpdir ]; then
err 3 "unable to create temp dir"
exit
--- 716,734 ----
}
+ TMPDIR=${TMPDIR:-"/tmp"} # Consider either a default value, or /tmp
+ if [ -d ${TMPDIR} ]; then
+ T_TMPDIR=${TMPDIR}
+ else
+ for i in /tmp /usr/tmp /var/tmp; do
+ if [ -d ${i} ]; then
+ TMPDIR=$i
+ break
+ fi
+ done
+ fi
+
case `uname` in
SunOS|AIX|MINGW32*)
! if [ -z $TMPDIR ]; then
err 3 "unable to create temp dir"
exit
***************
*** 733,742 ****
rstring=slony-regress.$rstring
! mkdir $tmpdir/$rstring
retcode=$?
if [ $retcode -ne 0 ]; then
err $retcode "unable to create temp dir"
else
! mktmp=$tmpdir/$rstring
fi
;;
--- 739,748 ----
rstring=slony-regress.$rstring
! mkdir ${TMPDIR}/$rstring
retcode=$?
if [ $retcode -ne 0 ]; then
err $retcode "unable to create temp dir"
else
! mktmp=${TMPDIR}/$rstring
fi
;;
***************
*** 744,748 ****
mktmp=`mktemp -d -t slony-regress.XXXXXX`
if [ $MY_MKTEMP_IS_DECREPIT ] ; then
! mktmp=`mktemp -d /tmp/slony-regress.XXXXXX`
fi
if [ ! -d $mktmp ]; then
--- 750,754 ----
mktmp=`mktemp -d -t slony-regress.XXXXXX`
if [ $MY_MKTEMP_IS_DECREPIT ] ; then
! mktmp=`mktemp -d ${TMPDIR}/slony-regress.XXXXXX`
fi
if [ ! -d $mktmp ]; then
***************
*** 758,762 ****
esac
!
. $testname/generate_dml.sh
--- 764,768 ----
esac
! echo ${testname} > ${mktmp}/TestName
. $testname/generate_dml.sh
***************
*** 812,815 ****
gen_testinfo
drop_databases
! cleanup
!
--- 818,820 ----
gen_testinfo
drop_databases
! cleanup
\ No newline at end of file
From cbbrowne at lists.slony.info Tue Apr 8 15:12:29 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Tue Apr 8 15:12:31 2008
Subject: [Slony1-commit] slony1-engine/doc/adminguide cluster.sgml faq.sgml
testbed.sgml
Message-ID: <20080408221229.CAD64290DBC@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/doc/adminguide
In directory main.slony.info:/tmp/cvs-serv30581
Modified Files:
cluster.sgml faq.sgml testbed.sgml
Log Message:
Fix SGML tagging problem in testbed.sgml, and add commentary indicating
the challenges of renumbering nodes.
Index: cluster.sgml
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/doc/adminguide/cluster.sgml,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** cluster.sgml 25 Feb 2008 15:37:58 -0000 1.14
--- cluster.sgml 8 Apr 2008 22:12:27 -0000 1.15
***************
*** 23,26 ****
--- 23,31 ----
node #1, and for the subscriber to be node #2.
+ Note that, as recorded in the under How can I renumber nodes?, it is
+ not particularly possible to change a node's node number after it has
+ been set up.
+
Some planning should be done, in more complex cases, to ensure
that the numbering system is kept sane, lest the administrators be
Index: testbed.sgml
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/doc/adminguide/testbed.sgml,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** testbed.sgml 7 Apr 2008 20:47:48 -0000 1.17
--- testbed.sgml 8 Apr 2008 22:12:27 -0000 1.18
***************
*** 147,150 ****
--- 147,151 ----
+
TMPDIR
Index: faq.sgml
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/doc/adminguide/faq.sgml,v
retrieving revision 1.75
retrieving revision 1.76
diff -C2 -d -r1.75 -r1.76
*** faq.sgml 27 Mar 2008 18:21:58 -0000 1.75
--- faq.sgml 8 Apr 2008 22:12:27 -0000 1.76
***************
*** 341,344 ****
--- 341,370 ----
+
+
+ I'd like to renumber the node numbers in my cluster.
+ How can I renumber nodes?
+
+ The first answer is you can't do that
-
+ &slony1; node numbers are not particularly amenable to being
+ changed.
Node numbers are deeply woven into the fibres
+ of the schema, by virtue of being written into virtually every table
+ in the system, and by virtue of being used as the basis for event
+ propagation. The only time that it might be OK
to
+ modify a node number is at some time where we know that it is not in
+ use, and we would need to do updates against each node in the cluster
+ in an organized fashion.
+
+ To do this in an automated fashion seems like a
+ huge challenge, as it spontaneously changes the
+ structure of the very event propagation system that is required for
+ such a change to propagate.
+
+ If it is enormously necessary to
+ renumber nodes, this might be accomplished by dropping and re-adding
+ nodes to get rid of the node formerly using the node ID that needs to
+ be held by another node.
+
+
From cbbrowne at lists.slony.info Fri Apr 11 07:55:16 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Fri Apr 11 07:55:18 2008
Subject: [Slony1-commit] slony1-engine/doc/adminguide cluster.sgml faq.sgml
slonik_ref.sgml
Message-ID: <20080411145516.AE024290E3E@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/doc/adminguide
In directory main.slony.info:/tmp/cvs-serv12889
Modified Files:
cluster.sgml faq.sgml slonik_ref.sgml
Log Message:
Document that node numbers are immutable by intent.
Also, fix docs to CLONE commands to indicate that these are new in
v2.0, not v1.2
Index: cluster.sgml
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/doc/adminguide/cluster.sgml,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** cluster.sgml 8 Apr 2008 22:12:27 -0000 1.15
--- cluster.sgml 11 Apr 2008 14:55:14 -0000 1.16
***************
*** 24,30 ****
Note that, as recorded in the under How can I renumber nodes?, it is
! not particularly possible to change a node's node number after it has
! been set up.
Some planning should be done, in more complex cases, to ensure
--- 24,30 ----
Note that, as recorded in the under How can I renumber nodes?, the
! node number is immutable, so it is not possible to change a node's
! node number after it has been set up.
Some planning should be done, in more complex cases, to ensure
Index: slonik_ref.sgml
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/doc/adminguide/slonik_ref.sgml,v
retrieving revision 1.83
retrieving revision 1.84
diff -C2 -d -r1.83 -r1.84
*** slonik_ref.sgml 27 Mar 2008 19:55:40 -0000 1.83
--- slonik_ref.sgml 11 Apr 2008 14:55:14 -0000 1.84
***************
*** 511,516 ****
ID = ival
! The unique, numeric ID number of the new
! node.
--- 511,520 ----
ID = ival
! The unique, immutable numeric ID number of the new
! node.
!
! Note that the ID is immutable
! because it is used as the basis for inter-node event
! communications.
***************
*** 3063,3067 ****
Version Information
! This command was introduced in &slony1; 1.2.0.
--- 3067,3071 ----
Version Information
! This command was introduced in &slony1; 2.0.
***************
*** 3101,3105 ****
Version Information
! This command was introduced in &slony1; 1.2.0.
--- 3105,3109 ----
Version Information
! This command was introduced in &slony1; 2.0.
Index: faq.sgml
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/doc/adminguide/faq.sgml,v
retrieving revision 1.76
retrieving revision 1.77
diff -C2 -d -r1.76 -r1.77
*** faq.sgml 8 Apr 2008 22:12:27 -0000 1.76
--- faq.sgml 11 Apr 2008 14:55:14 -0000 1.77
***************
*** 347,354 ****
The first answer is you can't do that
-
! &slony1; node numbers are not particularly amenable to being
! changed.
Node numbers are deeply woven into the fibres
! of the schema, by virtue of being written into virtually every table
! in the system, and by virtue of being used as the basis for event
propagation. The only time that it might be OK
to
modify a node number is at some time where we know that it is not in
--- 347,354 ----
The first answer is you can't do that
-
! &slony1; node numbers are quite immutable.
Node numbers
! are deeply woven into the fibres of the schema, by virtue of being
! written into virtually every table in the system, but much more
! importantly by virtue of being used as the basis for event
propagation. The only time that it might be OK
to
modify a node number is at some time where we know that it is not in
***************
*** 357,363 ****
To do this in an automated fashion seems like a
! huge challenge, as it spontaneously changes the
! structure of the very event propagation system that is required for
! such a change to propagate.
If it is enormously necessary to
--- 357,363 ----
To do this in an automated fashion seems like a
! huge challenge, as it changes the structure of
! the very event propagation system that already needs to be working in
! order for such a change to propagate.
If it is enormously necessary to
From cbbrowne at lists.slony.info Fri Apr 11 07:56:10 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Fri Apr 11 07:56:12 2008
Subject: [Slony1-commit] slony1-engine TODO
Message-ID: <20080411145610.DA70E290DF2@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine
In directory main.slony.info:/tmp/cvs-serv13243
Modified Files:
TODO
Log Message:
Add in TODO item to have tuple application take place on the subscriber
via running triggers on log tables, and loading the data in via COPY
Index: TODO
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/TODO,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** TODO 22 Nov 2007 23:02:06 -0000 1.15
--- TODO 11 Apr 2008 14:56:08 -0000 1.16
***************
*** 116,127 ****
- Could it have some policy in it as to preferred failover targets?
-
- Have Tuple Application Work take place on the subscriber
-
- - When data is pulled from sl_log_*, turn the output into a COPY
- statement
-
- - Thus, the data is input, in bulk, using a COPY statement
-
- - Then have triggers on sl_log_* that perform the "distribution"
- work to insert/delete/update data on the subscriber
--- 116,117 ----
From cbbrowne at lists.slony.info Fri Apr 11 08:08:21 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Fri Apr 11 08:08:22 2008
Subject: [Slony1-commit] slony1-engine/src/backend slony1_funcs.sql
Message-ID: <20080411150821.289BD290D22@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/src/backend
In directory main.slony.info:/tmp/cvs-serv14054
Modified Files:
slony1_funcs.sql
Log Message:
Change cleanupEvent() to actually use the interval passed in (e.g. -
p_interval) as the basis for what old data to purge, rather than the
hard-coded '10 minute' interval.
Index: slony1_funcs.sql
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/backend/slony1_funcs.sql,v
retrieving revision 1.134
retrieving revision 1.135
diff -C2 -d -r1.134 -r1.135
*** slony1_funcs.sql 28 Feb 2008 19:38:58 -0000 1.134
--- slony1_funcs.sql 11 Apr 2008 15:08:19 -0000 1.135
***************
*** 4534,4538 ****
for v_max_row in select con_origin, con_received, max(con_seqno) as con_seqno
from @NAMESPACE@.sl_confirm
! where con_timestamp < (CURRENT_TIMESTAMP - ''10 min''::interval)
group by con_origin, con_received
loop
--- 4534,4538 ----
for v_max_row in select con_origin, con_received, max(con_seqno) as con_seqno
from @NAMESPACE@.sl_confirm
! where con_timestamp < (CURRENT_TIMESTAMP - p_interval)
group by con_origin, con_received
loop
From cbbrowne at lists.slony.info Fri Apr 11 08:37:11 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Fri Apr 11 08:37:12 2008
Subject: [Slony1-commit] slony1-engine/tests support_funcs.sh
Message-ID: <20080411153711.1264E290DA5@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/tests
In directory main.slony.info:/tmp/cvs-serv16274
Modified Files:
support_funcs.sh
Log Message:
Added support to be able to Twitter test results
Index: support_funcs.sh
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/tests/support_funcs.sh,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** support_funcs.sh 9 Jan 2008 20:49:33 -0000 1.8
--- support_funcs.sh 11 Apr 2008 15:37:08 -0000 1.9
***************
*** 223,232 ****
fi
! BASEOUTPUT="select ${CLNAME}.getModuleversion() || '|' || ${CLNAME}.slonyVersionMajor() || '|' || ${CLNAME}.slonyVersionMinor() || '|' || ${CLNAME}.slonyVersionPatchlevel() || '|' || version() || '|';"
! BASEOUTPUT=`${pgbindir}/psql -d ${DB1} -h ${HOST1} -p ${PORT1} -U ${USER1} -c "${QUERY}" -qAt`
! BASEOUTPUT="${BASEOUTPUT}|${UNAMEM}|${UNAMER}|${UNAMES}|${UNAMEV}|"
! BASEOUTPUT="${BASEOUTPUT}|${HOST}|${SLONYTESTER}|${testname}|${TESTSTARTTIME}|${TESTENDTIME}|${OK}|${DESC}"
echo "${BASEOUTPUT}" >> ${SLONYTESTFILE}
--- 223,234 ----
fi
! QUERY="select ${CLNAME}.getModuleversion() || '|' || ${CLNAME}.slonyVersionMajor() || '|' || ${CLNAME}.slonyVersionMinor() || '|' || ${CLNAME}.slonyVersionPatchlevel() || '|' || version() || '|';"
! BASEOUTPUT1=`${pgbindir}/psql -d ${DB1} -h ${HOST1} -p ${PORT1} -U ${USER1} -c "${QUERY}" -qAt`
! BASEOUTPUT2="${UNAMEM}|${UNAMER}|${UNAMES}|${UNAMEV}|"
! BASEOUTPUT3="${BASEOUTPUT1}|${BASEOUTPUT2}|${HOST}|${SLONYTESTER}|${testname}|${TESTSTARTTIME}|${TESTENDTIME}|${OK}|${DESC}"
+ TWITTEROUTPUT="Slony-I test - Success=${OK} - ${testname}"
+ #/usr/bin/tweet "${TWITTEROUTPUT}"
echo "${BASEOUTPUT}" >> ${SLONYTESTFILE}
From cbbrowne at lists.slony.info Fri Apr 11 08:39:34 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Fri Apr 11 08:39:38 2008
Subject: [Slony1-commit] slony1-engine/tests run_test.sh
Message-ID: <20080411153934.15046290D22@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/tests
In directory main.slony.info:/tmp/cvs-serv16337
Modified Files:
run_test.sh
Log Message:
Remedying tests so that STORE NODE, EXECUTE SCRIPT, and WAIT FOR EVENT
all provide values for slonik parameters that are no longer optional
in v2.0
Index: run_test.sh
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/tests/run_test.sh,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** run_test.sh 7 Apr 2008 20:47:48 -0000 1.21
--- run_test.sh 11 Apr 2008 15:39:31 -0000 1.22
***************
*** 186,190 ****
if [ -n "${db}" -a "${host}" -a "${user}" -a "${port}" ]; then
if [ ${node} -ne ${originnode} ]; then
! echo "STORE NODE (id=@node${node}, comment='node ${node}');" >> $mktmp/slonik.script
fi
if [ ${node} -ge ${NUMNODES} ]; then
--- 186,190 ----
if [ -n "${db}" -a "${host}" -a "${user}" -a "${port}" ]; then
if [ ${node} -ne ${originnode} ]; then
! echo "STORE NODE (id=@node${node}, comment='node ${node}', event node=${originnode});" >> $mktmp/slonik.script
fi
if [ ${node} -ge ${NUMNODES} ]; then
***************
*** 818,820 ****
gen_testinfo
drop_databases
! cleanup
\ No newline at end of file
--- 818,820 ----
gen_testinfo
drop_databases
! cleanup
From cbbrowne at lists.slony.info Fri Apr 11 08:39:34 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Fri Apr 11 08:39:38 2008
Subject: [Slony1-commit] slony1-engine/tests/testddl generate_dml.sh
init_subscribe_set.ik
Message-ID: <20080411153934.2201D290DA5@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/tests/testddl
In directory main.slony.info:/tmp/cvs-serv16337/testddl
Modified Files:
generate_dml.sh init_subscribe_set.ik
Log Message:
Remedying tests so that STORE NODE, EXECUTE SCRIPT, and WAIT FOR EVENT
all provide values for slonik parameters that are no longer optional
in v2.0
Index: init_subscribe_set.ik
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/tests/testddl/init_subscribe_set.ik,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** init_subscribe_set.ik 18 Apr 2007 19:26:54 -0000 1.3
--- init_subscribe_set.ik 11 Apr 2008 15:39:32 -0000 1.4
***************
*** 3,7 ****
subscribe set ( id = 1, provider = 1, receiver = 2, forward = no);
sync(id=1);
! wait for event (origin=1, confirmed=2);
echo 'sleep a couple seconds';
sleep (seconds = 2);
--- 3,7 ----
subscribe set ( id = 1, provider = 1, receiver = 2, forward = no);
sync(id=1);
! wait for event (origin=1, confirmed=2, wait on=1);
echo 'sleep a couple seconds';
sleep (seconds = 2);
Index: generate_dml.sh
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/tests/testddl/generate_dml.sh,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** generate_dml.sh 28 Sep 2007 20:24:35 -0000 1.9
--- generate_dml.sh 11 Apr 2008 15:39:32 -0000 1.10
***************
*** 95,99 ****
--- 95,101 ----
status "execute DDL script on node ${tnode}"
do_ik
+ status "DDL script completed on node ${tnode}"
done
+ wait_for_catchup
status "Generate still more data"
From cbbrowne at lists.slony.info Fri Apr 11 08:39:34 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Fri Apr 11 08:39:39 2008
Subject: [Slony1-commit] slony1-engine/tests/testmultipaths
init_subscribe_set.ik
Message-ID: <20080411153934.67335290E28@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/tests/testmultipaths
In directory main.slony.info:/tmp/cvs-serv16337/testmultipaths
Modified Files:
init_subscribe_set.ik
Log Message:
Remedying tests so that STORE NODE, EXECUTE SCRIPT, and WAIT FOR EVENT
all provide values for slonik parameters that are no longer optional
in v2.0
Index: init_subscribe_set.ik
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/tests/testmultipaths/init_subscribe_set.ik,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** init_subscribe_set.ik 19 Oct 2007 21:31:35 -0000 1.2
--- init_subscribe_set.ik 11 Apr 2008 15:39:32 -0000 1.3
***************
*** 1,17 ****
subscribe set (id = 1, provider = 1, receiver = 2, forward = yes);
- WAIT FOR EVENT (ORIGIN = ALL, CONFIRMED = ALL, WAIT ON = 2);
sync (id=1);
! WAIT FOR EVENT (ORIGIN = ALL, CONFIRMED = 2, WAIT ON = 2);
subscribe set (id = 1, provider = 1, receiver = 3, forward = yes);
- WAIT FOR EVENT (ORIGIN = ALL, CONFIRMED = ALL, WAIT ON = 3);
sync (id=1);
! WAIT FOR EVENT (ORIGIN = ALL, CONFIRMED = 3, WAIT ON = 3);
subscribe set (id = 2, provider = 1, receiver = 2, forward = yes);
- WAIT FOR EVENT (ORIGIN = ALL, CONFIRMED = ALL, WAIT ON = 2);
sync (id=1);
! WAIT FOR EVENT (ORIGIN = ALL, CONFIRMED = 2, WAIT ON = 2);
subscribe set (id = 2, provider = 2, receiver = 3, forward = yes);
- WAIT FOR EVENT (ORIGIN = ALL, CONFIRMED = ALL, WAIT ON = 3);
sync (id=1);
! WAIT FOR EVENT (ORIGIN = ALL, CONFIRMED = 3, WAIT ON = 3);
--- 1,13 ----
subscribe set (id = 1, provider = 1, receiver = 2, forward = yes);
sync (id=1);
! wait for event (origin = all, confirmed = 2, wait on = 1);
subscribe set (id = 1, provider = 1, receiver = 3, forward = yes);
sync (id=1);
! wait for event (origin = all, confirmed = 3, wait on = 1);
subscribe set (id = 2, provider = 1, receiver = 2, forward = yes);
sync (id=1);
! wait for event (origin = all, confirmed = 2, wait on = 1);
subscribe set (id = 2, provider = 2, receiver = 3, forward = yes);
sync (id=1);
! wait for event (origin = all, confirmed = 3, wait on = 1);
From cbbrowne at lists.slony.info Fri Apr 11 08:39:34 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Fri Apr 11 08:39:39 2008
Subject: [Slony1-commit] slony1-engine/tests/testmultiplemoves
init_subscribe_set.ik
Message-ID: <20080411153934.68F6A290E4A@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/tests/testmultiplemoves
In directory main.slony.info:/tmp/cvs-serv16337/testmultiplemoves
Modified Files:
init_subscribe_set.ik
Log Message:
Remedying tests so that STORE NODE, EXECUTE SCRIPT, and WAIT FOR EVENT
all provide values for slonik parameters that are no longer optional
in v2.0
Index: init_subscribe_set.ik
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/tests/testmultiplemoves/init_subscribe_set.ik,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** init_subscribe_set.ik 27 Oct 2006 19:44:06 -0000 1.3
--- init_subscribe_set.ik 11 Apr 2008 15:39:32 -0000 1.4
***************
*** 1,19 ****
subscribe set (id=1, provider=1, receiver = 2, forward=yes);
- wait for event (origin=2, confirmed=1);
sync(id=1);
! wait for event (origin=1, confirmed=2);
subscribe set (id=2, provider=1, receiver = 2, forward=yes);
- wait for event (origin=2, confirmed=1);
sync(id=1);
! wait for event (origin=1, confirmed=2);
subscribe set (id=1, provider=2, receiver = 3, forward=yes);
- wait for event (origin=3, confirmed=2);
sync(id=1);
! wait for event (origin=1, confirmed=3);
subscribe set (id=2, provider=2, receiver = 3, forward=yes);
- wait for event (origin=3, confirmed=2);
sync(id=1);
! wait for event (origin=1, confirmed=3);
--- 1,15 ----
subscribe set (id=1, provider=1, receiver = 2, forward=yes);
sync(id=1);
! wait for event (origin=all, confirmed=2, wait on=1);
subscribe set (id=2, provider=1, receiver = 2, forward=yes);
sync(id=1);
! wait for event (origin=all, confirmed=2, wait on=1);
subscribe set (id=1, provider=2, receiver = 3, forward=yes);
sync(id=1);
! wait for event (origin=all, confirmed=3, wait on=1);
subscribe set (id=2, provider=2, receiver = 3, forward=yes);
sync(id=1);
! wait for event (origin=all, confirmed=3, wait on=1);
From cbbrowne at lists.slony.info Fri Apr 11 08:39:34 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Fri Apr 11 08:39:39 2008
Subject: [Slony1-commit] slony1-engine/tests/testpartition generate_dml.sh
Message-ID: <20080411153934.6AD60290E4B@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/tests/testpartition
In directory main.slony.info:/tmp/cvs-serv16337/testpartition
Modified Files:
generate_dml.sh
Log Message:
Remedying tests so that STORE NODE, EXECUTE SCRIPT, and WAIT FOR EVENT
all provide values for slonik parameters that are no longer optional
in v2.0
Index: generate_dml.sh
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/tests/testpartition/generate_dml.sh,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** generate_dml.sh 6 Sep 2007 16:12:00 -0000 1.2
--- generate_dml.sh 11 Apr 2008 15:39:32 -0000 1.3
***************
*** 81,83 ****
--- 81,85 ----
more_data
+ wait_for_catchup
+ status "done"
}
From cbbrowne at lists.slony.info Fri Apr 11 08:39:34 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Fri Apr 11 08:39:39 2008
Subject: [Slony1-commit] slony1-engine/tests/testinherit README
Message-ID: <20080411153934.3F4D1290DE4@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/tests/testinherit
In directory main.slony.info:/tmp/cvs-serv16337/testinherit
Modified Files:
README
Log Message:
Remedying tests so that STORE NODE, EXECUTE SCRIPT, and WAIT FOR EVENT
all provide values for slonik parameters that are no longer optional
in v2.0
Index: README
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/tests/testinherit/README,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** README 25 Sep 2007 21:36:29 -0000 1.4
--- README 11 Apr 2008 15:39:32 -0000 1.5
***************
*** 36,37 ****
--- 36,41 ----
- performs purchases on elements of those lists
- some of those purchases get rolled back, others don't
+
+ This test sets up its slonik scripts using
+ tools/configure-replication.sh, thereby drawing the blanket of
+ "replication regression tests" over this tool.
From cbbrowne at lists.slony.info Fri Apr 11 08:39:34 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Fri Apr 11 08:39:39 2008
Subject: [Slony1-commit] slony1-engine/tests/testdeadlockddl
init_subscribe_set.ik
Message-ID: <20080411153934.6AECE290E4D@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/tests/testdeadlockddl
In directory main.slony.info:/tmp/cvs-serv16337/testdeadlockddl
Modified Files:
init_subscribe_set.ik
Log Message:
Remedying tests so that STORE NODE, EXECUTE SCRIPT, and WAIT FOR EVENT
all provide values for slonik parameters that are no longer optional
in v2.0
Index: init_subscribe_set.ik
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/tests/testdeadlockddl/init_subscribe_set.ik,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** init_subscribe_set.ik 26 Sep 2007 22:19:57 -0000 1.1
--- init_subscribe_set.ik 11 Apr 2008 15:39:32 -0000 1.2
***************
*** 3,7 ****
subscribe set ( id = 1, provider = 1, receiver = 2, forward = no);
sync(id=1);
! wait for event (origin=1, confirmed=2);
echo 'sleep a couple seconds';
sleep (seconds = 2);
--- 3,7 ----
subscribe set ( id = 1, provider = 1, receiver = 2, forward = no);
sync(id=1);
! wait for event (origin=1, confirmed=2, wait on=1);
echo 'sleep a couple seconds';
sleep (seconds = 2);
From cbbrowne at lists.slony.info Fri Apr 11 08:40:27 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Fri Apr 11 08:40:29 2008
Subject: [Slony1-commit] slony1-engine/tools mkmediawiki.pl
Message-ID: <20080411154027.ADBB8290E28@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/tools
In directory main.slony.info:/tmp/cvs-serv16484/tools
Modified Files:
mkmediawiki.pl
Log Message:
Remove Emacs control string
Index: mkmediawiki.pl
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/tools/mkmediawiki.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** mkmediawiki.pl 5 Jul 2007 20:52:06 -0000 1.2
--- mkmediawiki.pl 11 Apr 2008 15:40:25 -0000 1.3
***************
*** 1,3 ****
! #!/usr/bin/perl # -*- perl -*-
# $Id$
# Christopher Browne
--- 1,3 ----
! #!/usr/bin/perl
# $Id$
# Christopher Browne
From cbbrowne at lists.slony.info Fri Apr 11 08:41:55 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Fri Apr 11 08:41:56 2008
Subject: [Slony1-commit] slony1-engine COPYRIGHT
Message-ID: <20080411154155.BDA2C290DA5@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine
In directory main.slony.info:/tmp/cvs-serv16829
Modified Files:
COPYRIGHT
Log Message:
Update copyright to include 2008
Index: COPYRIGHT
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/COPYRIGHT,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** COPYRIGHT 25 Jan 2007 16:28:17 -0000 1.4
--- COPYRIGHT 11 Apr 2008 15:41:53 -0000 1.5
***************
*** 1,5 ****
Slony-I - A replication system for the PostgreSQL Database Management System
! Copyright (c) 2003-2007, PostgreSQL Global Development Group
Permission to use, copy, modify, and distribute this software and its
--- 1,5 ----
Slony-I - A replication system for the PostgreSQL Database Management System
! Copyright (c) 2003-2008, PostgreSQL Global Development Group
Permission to use, copy, modify, and distribute this software and its
From cbbrowne at lists.slony.info Fri Apr 11 08:42:26 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Fri Apr 11 08:42:27 2008
Subject: [Slony1-commit] slony1-engine .cvsignore
Message-ID: <20080411154226.C2854290D22@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine
In directory main.slony.info:/tmp/cvs-serv16849
Modified Files:
.cvsignore
Log Message:
Add configure to list of files CVS should ignore
Index: .cvsignore
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/.cvsignore,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** .cvsignore 12 Jul 2004 20:34:55 -0000 1.5
--- .cvsignore 11 Apr 2008 15:42:24 -0000 1.6
***************
*** 7,8 ****
--- 7,9 ----
Makefile.port
GNUmakefile
+ configure
From cbbrowne at lists.slony.info Fri Apr 11 08:43:10 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Fri Apr 11 08:43:11 2008
Subject: [Slony1-commit] slony1-engine/src/slonik Makefile
Message-ID: <20080411154310.A7A19290DA5@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/src/slonik
In directory main.slony.info:/tmp/cvs-serv16872
Modified Files:
Makefile
Log Message:
Apply changes to slonik makefile that have gone into v1.2
Index: Makefile
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slonik/Makefile,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** Makefile 14 Feb 2008 22:35:58 -0000 1.27
--- Makefile 11 Apr 2008 15:43:08 -0000 1.28
***************
*** 21,31 ****
PROG = slonik
ifeq ($(PORTNAME), win)
PROG = slonik.exe
- LDFLAGS += -lpgport
endif
ifeq ($(PORTNAME), win32)
PROG = slonik.exe
- LDFLAGS += -lpgport
endif
--- 21,30 ----
PROG = slonik
+ LDFLAGS += -lpgport
ifeq ($(PORTNAME), win)
PROG = slonik.exe
endif
ifeq ($(PORTNAME), win32)
PROG = slonik.exe
endif
From cbbrowne at lists.slony.info Fri Apr 11 08:44:24 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Fri Apr 11 08:44:26 2008
Subject: [Slony1-commit] slony1-engine RELEASE-2.0
Message-ID: <20080411154424.D8786290D22@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine
In directory main.slony.info:/tmp/cvs-serv16896
Modified Files:
RELEASE-2.0
Log Message:
Various instances where slonik would use a default node ID of 1 have been changed to remove this.
Slonik scripts may need to be changed to indicate an EVENT NODE (or
similar) after migration to v2.0 as a result.
The slonik commands involved:
- STORE NODE - EVENT NODE
- DROP NODE - EVENT NODE
- WAIT FOR EVENT - WAIT ON
- FAILOVER - BACKUP NODE
- EXECUTE SCRIPT - EVENT NODE
Index: RELEASE-2.0
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/RELEASE-2.0,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** RELEASE-2.0 6 Feb 2008 20:51:56 -0000 1.14
--- RELEASE-2.0 11 Apr 2008 15:44:22 -0000 1.15
***************
*** 171,172 ****
--- 171,186 ----
than the first SYNC in a SYNC group, as the extra notifications are
redundant.
+
+ - Various instances where slonik would use a default node ID of 1 have
+ been changed to remove this.
+
+ Slonik scripts may need to be changed to indicate an EVENT NODE (or
+ similar) after migration to v2.0 as a result.
+
+ The slonik commands involved:
+
+ - STORE NODE - EVENT NODE
+ - DROP NODE - EVENT NODE
+ - WAIT FOR EVENT - WAIT ON
+ - FAILOVER - BACKUP NODE
+ - EXECUTE SCRIPT - EVENT NODE
\ No newline at end of file
From cbbrowne at lists.slony.info Fri Apr 11 08:44:25 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Fri Apr 11 08:44:27 2008
Subject: [Slony1-commit] slony1-engine/makefiles Makefile.win32
Message-ID: <20080411154425.04BB0290DE4@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/makefiles
In directory main.slony.info:/tmp/cvs-serv16896/makefiles
Modified Files:
Makefile.win32
Log Message:
Various instances where slonik would use a default node ID of 1 have been changed to remove this.
Slonik scripts may need to be changed to indicate an EVENT NODE (or
similar) after migration to v2.0 as a result.
The slonik commands involved:
- STORE NODE - EVENT NODE
- DROP NODE - EVENT NODE
- WAIT FOR EVENT - WAIT ON
- FAILOVER - BACKUP NODE
- EXECUTE SCRIPT - EVENT NODE
From cbbrowne at lists.slony.info Fri Apr 11 08:44:24 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Fri Apr 11 08:44:27 2008
Subject: [Slony1-commit] slony1-engine/doc/adminguide slonik_ref.sgml
Message-ID: <20080411154425.19501290E4A@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/doc/adminguide
In directory main.slony.info:/tmp/cvs-serv16896/doc/adminguide
Modified Files:
slonik_ref.sgml
Log Message:
Various instances where slonik would use a default node ID of 1 have been changed to remove this.
Slonik scripts may need to be changed to indicate an EVENT NODE (or
similar) after migration to v2.0 as a result.
The slonik commands involved:
- STORE NODE - EVENT NODE
- DROP NODE - EVENT NODE
- WAIT FOR EVENT - WAIT ON
- FAILOVER - BACKUP NODE
- EXECUTE SCRIPT - EVENT NODE
Index: slonik_ref.sgml
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/doc/adminguide/slonik_ref.sgml,v
retrieving revision 1.84
retrieving revision 1.85
diff -C2 -d -r1.84 -r1.85
*** slonik_ref.sgml 11 Apr 2008 14:55:14 -0000 1.84
--- slonik_ref.sgml 11 Apr 2008 15:44:22 -0000 1.85
***************
*** 49,55 ****
The slonik command language is format free. Commands begin with
keywords and are terminated with a semicolon. Most commands have
! a list of parameters, some of which have default values and are
! therefore optional. The parameters of commands are enclosed in
! parentheses. Each option consists of one or more keywords,
followed by an equal sign, followed by a value. Multiple options
inside the parentheses are separated by commas. All keywords are
--- 49,55 ----
The slonik command language is format free. Commands begin with
keywords and are terminated with a semicolon. Most commands have
! a list of parameters, some of which have default values and that
! are therefore optional. The parameters of commands are enclosed
! in parentheses. Each option consists of one or more keywords,
followed by an equal sign, followed by a value. Multiple options
inside the parentheses are separated by commas. All keywords are
***************
*** 541,546 ****
The ID of the node used to create the configuration
! event that tells all existing nodes about the new node. Default
! value is 1.
--- 541,546 ----
The ID of the node used to create the configuration
! event that tells all existing nodes about the new node.
!
***************
*** 568,571 ****
--- 568,572 ----
for this purpose. In later versions, hopefully
SPOOLNODE will be unavailable.
+ In version 2.0, the default value for EVENT NODE was removed, so a node must be specified.
***************
*** 598,602 ****
EVENT NODE = ival
! Node ID of the node to generate the event; default is 1.
--- 599,603 ----
EVENT NODE = ival
! Node ID of the node to generate the event.
***************
*** 639,642 ****
--- 640,644 ----
Version Information
This command was introduced in &slony1; 1.0
+ In version 2.0, the default value for EVENT NODE was removed, so a node must be specified.
***************
*** 2564,2567 ****
--- 2566,2570 ----
Version Information
This command was introduced in &slony1; 1.0
+ In version 2.0, the default BACKUP NODE value of 1 was removed, so it is mandatory to provide a value for this parameter.
***************
*** 2617,2621 ****
EVENT NODE = ival
! (Optional) The ID of the current origin of the set. Default value is 1.
--- 2620,2624 ----
EVENT NODE = ival
! (Mandatory) The ID of the current origin of the set.
***************
*** 2716,2719 ****
--- 2719,2726 ----
This deals with the risk that one might request DDL changes on
tables in multiple replication sets.
+
+ In version 2.0, the default value for EVENT
+ NODE was removed, so a node must be specified.
+
***************
*** 2834,2838 ****
WAIT ON = ival
The ID of the node where the &slconfirm; table
! is to be checked. The default value is 1.
--- 2841,2845 ----
WAIT ON = ival
The ID of the node where the &slconfirm; table
! is to be checked.
***************
*** 2862,2865 ****
--- 2869,2876 ----
Version Information
This command was introduced in &slony1; 1.0
+
+ In version 2.0, the default value for WAIT ON
+ was removed, so a node must be specified.
+
From cbbrowne at lists.slony.info Fri Apr 11 08:44:25 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Fri Apr 11 08:44:27 2008
Subject: [Slony1-commit] slony1-engine/src/slonik parser.y slonik.c
Message-ID: <20080411154425.27EC2290E4D@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/src/slonik
In directory main.slony.info:/tmp/cvs-serv16896/src/slonik
Modified Files:
parser.y slonik.c
Log Message:
Various instances where slonik would use a default node ID of 1 have been changed to remove this.
Slonik scripts may need to be changed to indicate an EVENT NODE (or
similar) after migration to v2.0 as a result.
The slonik commands involved:
- STORE NODE - EVENT NODE
- DROP NODE - EVENT NODE
- WAIT FOR EVENT - WAIT ON
- FAILOVER - BACKUP NODE
- EXECUTE SCRIPT - EVENT NODE
Index: parser.y
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slonik/parser.y,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** parser.y 14 Feb 2008 22:21:42 -0000 1.31
--- parser.y 11 Apr 2008 15:44:23 -0000 1.32
***************
*** 566,571 ****
SlonikStmt_init_cluster *new;
statement_option opt[] = {
! STMT_OPTION_INT( O_ID, 1 ),
! STMT_OPTION_STR( O_COMMENT, "Primary Node 1" ),
STMT_OPTION_END
};
--- 566,571 ----
SlonikStmt_init_cluster *new;
statement_option opt[] = {
! STMT_OPTION_INT( O_ID, -1 ),
! STMT_OPTION_STR( O_COMMENT, "Initial Node" ),
STMT_OPTION_END
};
***************
*** 596,600 ****
STMT_OPTION_INT( O_ID, -1 ),
STMT_OPTION_STR( O_COMMENT, NULL ),
! STMT_OPTION_INT( O_EVENT_NODE, 1 ),
STMT_OPTION_END
};
--- 596,600 ----
STMT_OPTION_INT( O_ID, -1 ),
STMT_OPTION_STR( O_COMMENT, NULL ),
! STMT_OPTION_INT( O_EVENT_NODE, -1 ),
STMT_OPTION_END
};
***************
*** 625,629 ****
statement_option opt[] = {
STMT_OPTION_INT( O_ID, -1 ),
! STMT_OPTION_INT( O_EVENT_NODE, 1 ),
STMT_OPTION_END
};
--- 625,629 ----
statement_option opt[] = {
STMT_OPTION_INT( O_ID, -1 ),
! STMT_OPTION_INT( O_EVENT_NODE, -1 ),
STMT_OPTION_END
};
***************
*** 653,657 ****
statement_option opt[] = {
STMT_OPTION_INT( O_ID, -1 ),
! STMT_OPTION_INT( O_BACKUP_NODE, 1 ),
STMT_OPTION_END
};
--- 653,657 ----
statement_option opt[] = {
STMT_OPTION_INT( O_ID, -1 ),
! STMT_OPTION_INT( O_BACKUP_NODE, -1 ),
STMT_OPTION_END
};
***************
*** 1184,1188 ****
}
;
-
stmt_unsubscribe_set : lno K_UNSUBSCRIBE K_SET option_list
{
--- 1184,1187 ----
***************
*** 1305,1309 ****
STMT_OPTION_INT( O_SET_ID, -1 ),
STMT_OPTION_STR( O_FILENAME, NULL ),
! STMT_OPTION_INT( O_EVENT_NODE, 1 ),
STMT_OPTION_INT( O_EXECUTE_ONLY_ON, -1 ),
STMT_OPTION_END
--- 1304,1308 ----
STMT_OPTION_INT( O_SET_ID, -1 ),
STMT_OPTION_STR( O_FILENAME, NULL ),
! STMT_OPTION_INT( O_EVENT_NODE, -1 ),
STMT_OPTION_INT( O_EXECUTE_ONLY_ON, -1 ),
STMT_OPTION_END
***************
*** 1336,1340 ****
SlonikStmt_update_functions *new;
statement_option opt[] = {
! STMT_OPTION_INT( O_ID, 1 ),
STMT_OPTION_END
};
--- 1335,1339 ----
SlonikStmt_update_functions *new;
statement_option opt[] = {
! STMT_OPTION_INT( O_ID, -1 ),
STMT_OPTION_END
};
***************
*** 1362,1366 ****
statement_option opt[] = {
STMT_OPTION_INT( O_SET_ID, -1 ),
! STMT_OPTION_INT( O_EVENT_NODE, 1 ),
STMT_OPTION_INT( O_EXECUTE_ONLY_ON, -1 ),
STMT_OPTION_END
--- 1361,1365 ----
statement_option opt[] = {
STMT_OPTION_INT( O_SET_ID, -1 ),
! STMT_OPTION_INT( O_EVENT_NODE, -1 ),
STMT_OPTION_INT( O_EXECUTE_ONLY_ON, -1 ),
STMT_OPTION_END
***************
*** 1394,1398 ****
STMT_OPTION_INT( O_ORIGIN, -1 ),
STMT_OPTION_INT( O_WAIT_CONFIRMED, -1 ),
! STMT_OPTION_INT( O_WAIT_ON, 1 ),
STMT_OPTION_INT( O_TIMEOUT, 600 ),
STMT_OPTION_END
--- 1393,1397 ----
STMT_OPTION_INT( O_ORIGIN, -1 ),
STMT_OPTION_INT( O_WAIT_CONFIRMED, -1 ),
! STMT_OPTION_INT( O_WAIT_ON, -1 ),
STMT_OPTION_INT( O_TIMEOUT, 600 ),
STMT_OPTION_END
Index: slonik.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slonik/slonik.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -C2 -d -r1.87 -r1.88
*** slonik.c 14 Feb 2008 22:21:42 -0000 1.87
--- slonik.c 11 Apr 2008 15:44:23 -0000 1.88
***************
*** 30,33 ****
--- 30,34 ----
#include "postgres.h"
#include "libpq-fe.h"
+ #include "port.h"
#include "slonik.h"
***************
*** 316,320 ****
if (stmt->ev_origin < 0)
{
! stmt->ev_origin = 1;
}
if (stmt->no_id == stmt->ev_origin)
--- 317,323 ----
if (stmt->ev_origin < 0)
{
! printf("%s:%d: Error: require EVENT NODE\n",
! hdr->stmt_filename, hdr->stmt_lno);
! errors++;
}
if (stmt->no_id == stmt->ev_origin)
***************
*** 336,339 ****
--- 339,348 ----
(SlonikStmt_drop_node *) hdr;
+ if (stmt->ev_origin < 0)
+ {
+ printf("%s:%d: Error: require EVENT NODE\n",
+ hdr->stmt_filename, hdr->stmt_lno);
+ errors++;
+ }
if (stmt->ev_origin == stmt->no_id)
{
***************
*** 353,356 ****
--- 362,371 ----
(SlonikStmt_failed_node *) hdr;
+ if (stmt->backup_node < 0)
+ {
+ printf("%s:%d: Error: require BACKUP NODE\n",
+ hdr->stmt_filename, hdr->stmt_lno);
+ errors++;
+ }
if (stmt->backup_node == stmt->no_id)
{
***************
*** 829,833 ****
}
break;
-
case STMT_LOCK_SET:
{
--- 844,847 ----
***************
*** 926,930 ****
if (stmt->ev_origin < 0)
{
! stmt->ev_origin = 1;
}
if (stmt->ddl_setid < 0)
--- 940,946 ----
if (stmt->ev_origin < 0)
{
! printf("%s:%d: Error: require EVENT NODE\n",
! hdr->stmt_filename, hdr->stmt_lno);
! errors++;
}
if (stmt->ddl_setid < 0)
From cbbrowne at lists.slony.info Fri Apr 11 11:00:38 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Fri Apr 11 11:00:41 2008
Subject: [Slony1-commit] slony1-engine/src/ducttape test_2_pgbench.in
test_3_pgbench.in test_4_pgbench.in test_5_ddlscript
test_5_pgbench.in test_6_autolisten.in test_8_logship.in
test_J_pgbench.in
Message-ID: <20080411180038.74CB6290E50@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/src/ducttape
In directory main.slony.info:/tmp/cvs-serv27179
Modified Files:
test_2_pgbench.in test_3_pgbench.in test_4_pgbench.in
test_5_ddlscript test_5_pgbench.in test_6_autolisten.in
test_8_logship.in test_J_pgbench.in
Log Message:
Modify ducttape scripts to add EVENT NODE / WAIT ON values that are now
mandatory, rather than being handled via defaults
Index: test_2_pgbench.in
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/ducttape/test_2_pgbench.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** test_2_pgbench.in 23 Jan 2008 17:12:34 -0000 1.5
--- test_2_pgbench.in 11 Apr 2008 18:00:36 -0000 1.6
***************
*** 224,228 ****
try {
! store node (id = 2, comment = 'Node 2');
store path (server = 1, client = 2, conninfo = 'dbname=$DB1');
store path (server = 2, client = 1, conninfo = 'dbname=$DB2');
--- 224,228 ----
try {
! store node (id = 2, comment = 'Node 2', event node=1);
store path (server = 1, client = 2, conninfo = 'dbname=$DB1');
store path (server = 2, client = 1, conninfo = 'dbname=$DB2');
***************
*** 297,301 ****
node 3 admin conninfo = 'dbname=$DB3';
! store node (id = 3, comment = 'Node 3');
store path (server = 1, client = 3, conninfo = 'dbname=$DB1');
--- 297,301 ----
node 3 admin conninfo = 'dbname=$DB3';
! store node (id = 3, comment = 'Node 3', event node=1);
store path (server = 1, client = 3, conninfo = 'dbname=$DB1');
Index: test_4_pgbench.in
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/ducttape/test_4_pgbench.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_4_pgbench.in 4 Jul 2005 23:45:21 -0000 1.1
--- test_4_pgbench.in 11 Apr 2008 18:00:36 -0000 1.2
***************
*** 195,199 ****
node 2 admin conninfo = 'dbname=$DB2';
try {
! store node (id = 2, comment = 'Node 2');
store path (server = 1, client = 2, conninfo = 'dbname=$DB1');
store path (server = 2, client = 1, conninfo = 'dbname=$DB2');
--- 195,199 ----
node 2 admin conninfo = 'dbname=$DB2';
try {
! store node (id = 2, comment = 'Node 2', event node=1);
store path (server = 1, client = 2, conninfo = 'dbname=$DB1');
store path (server = 2, client = 1, conninfo = 'dbname=$DB2');
Index: test_3_pgbench.in
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/ducttape/test_3_pgbench.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_3_pgbench.in 1 Jun 2006 12:35:52 -0000 1.2
--- test_3_pgbench.in 11 Apr 2008 18:00:36 -0000 1.3
***************
*** 266,270 ****
node 2 admin conninfo = 'dbname=$DB2';
try {
! store node (id = 2, comment = 'Node 2');
store path (server = 1, client = 2, conninfo = 'dbname=$DB1');
store path (server = 2, client = 1, conninfo = 'dbname=$DB2');
--- 266,270 ----
node 2 admin conninfo = 'dbname=$DB2';
try {
! store node (id = 2, comment = 'Node 2', event node=1);
store path (server = 1, client = 2, conninfo = 'dbname=$DB1');
store path (server = 2, client = 1, conninfo = 'dbname=$DB2');
Index: test_5_pgbench.in
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/ducttape/test_5_pgbench.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** test_5_pgbench.in 5 Jun 2007 22:22:07 -0000 1.4
--- test_5_pgbench.in 11 Apr 2008 18:00:36 -0000 1.5
***************
*** 209,213 ****
node 2 admin conninfo = 'dbname=$DB2';
try {
! store node (id = 2, comment = 'Node 2');
store path (server = 1, client = 2, conninfo = 'dbname=$DB1');
store path (server = 2, client = 1, conninfo = 'dbname=$DB2');
--- 209,213 ----
node 2 admin conninfo = 'dbname=$DB2';
try {
! store node (id = 2, comment = 'Node 2', event node=1);
store path (server = 1, client = 2, conninfo = 'dbname=$DB1');
store path (server = 2, client = 1, conninfo = 'dbname=$DB2');
Index: test_J_pgbench.in
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/ducttape/test_J_pgbench.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_J_pgbench.in 29 Nov 2006 20:13:37 -0000 1.2
--- test_J_pgbench.in 11 Apr 2008 18:00:36 -0000 1.3
***************
*** 224,228 ****
try {
! store node (id = 2, comment = 'Node 2');
store path (server = 1, client = 2, conninfo = 'dbname=$DB1');
store path (server = 2, client = 1, conninfo = 'dbname=$DB2');
--- 224,228 ----
try {
! store node (id = 2, comment = 'Node 2', event node=1);
store path (server = 1, client = 2, conninfo = 'dbname=$DB1');
store path (server = 2, client = 1, conninfo = 'dbname=$DB2');
***************
*** 302,306 ****
node 3 admin conninfo = 'dbname=$DB3';
! store node (id = 3, comment = 'Node 3');
store path (server = 1, client = 3, conninfo = 'dbname=$DB1');
--- 302,306 ----
node 3 admin conninfo = 'dbname=$DB3';
! store node (id = 3, comment = 'Node 3', event node=1);
store path (server = 1, client = 3, conninfo = 'dbname=$DB1');
Index: test_5_ddlscript
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/ducttape/test_5_ddlscript,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** test_5_ddlscript 5 Jun 2007 22:22:07 -0000 1.3
--- test_5_ddlscript 11 Apr 2008 18:00:36 -0000 1.4
***************
*** 91,95 ****
echo ' wait for execute script';
! wait for event (origin = 1, confirmed = 2);
try {
--- 91,95 ----
echo ' wait for execute script';
! wait for event (origin = 1, confirmed = 2, wait on=1);
try {
Index: test_8_logship.in
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/ducttape/test_8_logship.in,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** test_8_logship.in 27 Sep 2007 14:22:59 -0000 1.7
--- test_8_logship.in 11 Apr 2008 18:00:36 -0000 1.8
***************
*** 232,236 ****
try {
! store node (id = 2, comment = 'Node 2');
store path (server = 1, client = 2, conninfo = 'dbname=$DB1');
store path (server = 2, client = 1, conninfo = 'dbname=$DB2');
--- 232,236 ----
try {
! store node (id = 2, comment = 'Node 2', event node=1);
store path (server = 1, client = 2, conninfo = 'dbname=$DB1');
store path (server = 2, client = 1, conninfo = 'dbname=$DB2');
***************
*** 313,317 ****
node 3 admin conninfo = 'dbname=$DB3';
! store node (id = 3, comment = 'Node 3');
store path (server = 1, client = 3, conninfo = 'dbname=$DB1');
--- 313,317 ----
node 3 admin conninfo = 'dbname=$DB3';
! store node (id = 3, comment = 'Node 3', event node=1);
store path (server = 1, client = 3, conninfo = 'dbname=$DB1');
Index: test_6_autolisten.in
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/ducttape/test_6_autolisten.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_6_autolisten.in 1 Jun 2006 12:35:52 -0000 1.2
--- test_6_autolisten.in 11 Apr 2008 18:00:36 -0000 1.3
***************
*** 76,80 ****
$PREAMBLE
try {
! store node (id = $NODE, comment = 'Node $NODE');
store path (server = $PARENT, client = $NODE, conninfo = 'dbname=slony_test$PARENT');
store path (server = $NODE, client = $PARENT, conninfo = 'dbname=slony_test$NODE');
--- 76,80 ----
$PREAMBLE
try {
! store node (id = $NODE, comment = 'Node $NODE', event node=${PARENT});
store path (server = $PARENT, client = $NODE, conninfo = 'dbname=slony_test$PARENT');
store path (server = $NODE, client = $PARENT, conninfo = 'dbname=slony_test$NODE');
***************
*** 296,300 ****
$PREAMBLE
try {
! store node (id = 4, comment = 'Node $node');
store path (server = 3, client = 4, conninfo = 'dbname=slony_test3');
store path (server = 4, client = 3, conninfo = 'dbname=slony_test4');
--- 296,300 ----
$PREAMBLE
try {
! store node (id = 4, comment = 'Node $node', event node=1);
store path (server = 3, client = 4, conninfo = 'dbname=slony_test3');
store path (server = 4, client = 3, conninfo = 'dbname=slony_test4');
***************
*** 332,336 ****
$PREAMBLE
try {
! store node (id = $node, comment = 'Node $node');
store path (server = 4, client = $node, conninfo = 'dbname=slony_test4');
store path (server = $node, client = 4, conninfo = 'dbname=slony_test$node');
--- 332,336 ----
$PREAMBLE
try {
! store node (id = $node, comment = 'Node $node', event node=1);
store path (server = 4, client = $node, conninfo = 'dbname=slony_test4');
store path (server = $node, client = 4, conninfo = 'dbname=slony_test$node');
From devrim at lists.slony.info Mon Apr 14 03:25:54 2008
From: devrim at lists.slony.info (Devrim GUNDUZ)
Date: Mon Apr 14 03:25:55 2008
Subject: [Slony1-commit] slony1-engine/redhat postgresql-slony1.specfile
Message-ID: <20080414102554.2803F290D47@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/redhat
In directory main.slony.info:/tmp/cvs-serv13589/redhat
Modified Files:
Tag: REL_1_2_STABLE
postgresql-slony1.specfile
Log Message:
Update to 1.2.14 .
Index: postgresql-slony1.specfile
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/redhat/Attic/postgresql-slony1.specfile,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** postgresql-slony1.specfile 10 Feb 2008 20:38:08 -0000 1.1.2.2
--- postgresql-slony1.specfile 14 Apr 2008 10:25:52 -0000 1.1.2.3
***************
*** 5,9 ****
Summary: A "master to multiple slaves" replication system with cascading and failover
Name: postgresql-slony1
! Version: 1.2.13
Release: 1%{?dist}
License: BSD
--- 5,9 ----
Summary: A "master to multiple slaves" replication system with cascading and failover
Name: postgresql-slony1
! Version: 1.2.14
Release: 1%{?dist}
License: BSD
***************
*** 36,40 ****
Summary: Documentation for Slony-I
Group: Applications/Databases
! Requires: postgresql-slony1-1.2.11-%{release}
BuildRequires: libjpeg, netpbm-progs, groff, docbook-style-dsssl, ghostscript
--- 36,40 ----
Summary: Documentation for Slony-I
Group: Applications/Databases
! Requires: postgresql-slony1-1.2.14-%{release}
BuildRequires: libjpeg, netpbm-progs, groff, docbook-style-dsssl, ghostscript
***************
*** 141,144 ****
--- 141,147 ----
%changelog
+ * Mon Apr 14 2008 Devrim Gunduz 1.2.14-1
+ - Update to 1.2.14
+
* Sun Feb 10 2008 Devrim Gunduz 1.2.13-1
- Update to 1.2.13
From devrim at lists.slony.info Mon Apr 14 03:25:54 2008
From: devrim at lists.slony.info (Devrim GUNDUZ)
Date: Mon Apr 14 03:25:56 2008
Subject: [Slony1-commit] slony1-engine postgresql-slony1.spec.in
Message-ID: <20080414102554.1BADF290D22@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine
In directory main.slony.info:/tmp/cvs-serv13589
Modified Files:
Tag: REL_1_2_STABLE
postgresql-slony1.spec.in
Log Message:
Update to 1.2.14 .
Index: postgresql-slony1.spec.in
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/Attic/postgresql-slony1.spec.in,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -C2 -d -r1.1.2.4 -r1.1.2.5
*** postgresql-slony1.spec.in 10 Feb 2008 20:38:08 -0000 1.1.2.4
--- postgresql-slony1.spec.in 14 Apr 2008 10:25:51 -0000 1.1.2.5
***************
*** 141,144 ****
--- 141,147 ----
%changelog
+ * Mon Apr 14 2008 Devrim Gunduz 1.2.14-1
+ - Update to 1.2.14
+
* Sun Feb 10 2008 Devrim Gunduz 1.2.13-1
- Update to 1.2.13
From devrim at lists.slony.info Mon Apr 14 03:35:03 2008
From: devrim at lists.slony.info (Devrim GUNDUZ)
Date: Mon Apr 14 03:35:05 2008
Subject: [Slony1-commit] slony1-engine/doc/adminguide releasechecklist.sgml
Message-ID: <20080414103503.E845C290D47@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/doc/adminguide
In directory main.slony.info:/tmp/cvs-serv14053/doc/adminguide
Modified Files:
releasechecklist.sgml
Log Message:
Rename RPMs for 2.0+ from postgresql-slony1-engine to slony1 only, in order to contribute to world peace (save bytes). Change relevant calls to that file, and update docs.
Index: releasechecklist.sgml
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/doc/adminguide/releasechecklist.sgml,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** releasechecklist.sgml 22 Jun 2007 16:15:57 -0000 1.10
--- releasechecklist.sgml 14 Apr 2008 10:35:01 -0000 1.11
***************
*** 70,74 ****
PACKAGE_VERSION=REL_1_1_2
! PACKAGE_STRING=postgresql-slony1-engine REL_1_1_2
--- 70,74 ----
PACKAGE_VERSION=REL_1_1_2
! PACKAGE_STRING=slony1 REL_1_1_2
From devrim at lists.slony.info Mon Apr 14 03:35:03 2008
From: devrim at lists.slony.info (Devrim GUNDUZ)
Date: Mon Apr 14 03:35:06 2008
Subject: [Slony1-commit] slony1-engine INSTALL configure configure.ac
postgresql-slony1-engine.spec.in slony1.spec.in
Message-ID: <20080414103504.4A310290D47@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine
In directory main.slony.info:/tmp/cvs-serv14053
Modified Files:
INSTALL configure configure.ac
Added Files:
slony1.spec.in
Removed Files:
postgresql-slony1-engine.spec.in
Log Message:
Rename RPMs for 2.0+ from postgresql-slony1-engine to slony1 only, in order to contribute to world peace (save bytes). Change relevant calls to that file, and update docs.
--- NEW FILE: slony1.spec.in ---
%{!?perltools:%define perltools 1}
%{!?docs:%define docs 0}
%{?buildrhel3:%define kerbdir /usr/kerberos}
%{!?kerbdir:%define kerbdir "/usr"}
%define pg_version %(rpm -qv postgresql-devel|head -n 1|awk -F '-' '{print $3}')
Summary: A "master to multiple slaves" replication system with cascading and failover
Name: @PACKAGE_NAME@
Version: @PACKAGE_VERSION@
Release: 1_PG%{pg_version}
License: BSD
Group: Applications/Databases
URL: http://main.slony.info/
Source0: @PACKAGE_NAME@-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: postgresql-devel
Requires: postgresql-server = %{pg_version}
%if %docs
BuildRequires: docbook-style-dsssl
%endif
%define prefix /usr
%description
Slony-I is a "master to multiple slaves" replication
system for PostgreSQL with cascading and failover.
The big picture for the development of Slony-I is to build
a master-slave system that includes all features and
capabilities needed to replicate large databases to a
reasonably limited number of slave systems.
Slony-I is a system for data centers and backup
sites, where the normal mode of operation is that all nodes
are available
%if %docs
%package docs
Summary: Documentation for Slony-I
Group: Applications/Databases
Prereq: @PACKAGE_NAME@-@PACKAGE_VERSION@-%{release}
%description docs
The @PACKAGE_NAME@-docs package includes some documentation for Slony-I.
%endif
%prep
%setup -q -n @PACKAGE_NAME@-%{version}
%build
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS
CPPFLAGS="${CPPFLAGS} -I%{_includedir}/et -I%{kerbdir}/include" ; export CPPFLAGS
CFLAGS="${CFLAGS} -I%{_includedir}/et -I%{kerbdir}/include" ; export CFLAGS
# Strip out -ffast-math from CFLAGS....
CFLAGS=`echo $CFLAGS|xargs -n 1|grep -v ffast-math|xargs -n 100`
export LIBNAME=%{_lib}
./configure --includedir %{_includedir}/pgsql --with-pgconfigdir=%{_bindir} \
%if %perltools
--with-perltools=%{_bindir} --with-toolsbin=%{_bindir} \
%endif
%if %docs
--with-docs --with-docdir=%{_docdir}/%{name}-%{version} \
%endif
--datadir %{_datadir}/pgsql --sysconfdir=%{_sysconfdir} --with-pglibdir=%{_libdir}/pgsql
autoconf
make %{?_smp_mflags}
%if %perltools
make %{?_smp_mflags} -C tools
%endif
%install
rm -rf %{buildroot}
install -d %{buildroot}%{_sysconfdir}
install -d %{buildroot}%{_sysconfdir}/init.d/
install -d %{buildroot}%{_datadir}/pgsql/
install -d %{buildroot}%{_libdir}/pgsql/
make %{?_smp_mflags} DESTDIR=%{buildroot} install
install -m 0755 src/backend/slony1_funcs.so %{buildroot}%{_libdir}/pgsql/slony1_funcs.so
install -m 0755 src/xxid/xxid.so %{buildroot}%{_libdir}/pgsql/xxid.so
install -m 0644 src/backend/*.sql %{buildroot}%{_datadir}/pgsql/
install -m 0644 src/xxid/*.sql %{buildroot}%{_datadir}/pgsql/
install -m 0755 tools/*.sh %{buildroot}%{_bindir}/
install -m 0644 share/slon.conf-sample %{buildroot}%{_sysconfdir}/slon.conf
install -m 0755 redhat/slon.init %{buildroot}%{_sysconfdir}/init.d/slon
%if %perltools
cd tools
make %{?_smp_mflags} DESTDIR=%{buildroot} install
/bin/rm -rf altperl/*.pl altperl/ToDo altperl/README altperl/Makefile altperl/CVS
install -m 0644 altperl/slon_tools.conf-sample %{buildroot}%{_sysconfdir}/slon_tools.conf
install -m 0755 altperl/* %{buildroot}%{_bindir}/
install -m 0644 altperl/slon-tools %{buildroot}%{_libdir}/pgsql/slon-tools.pm
/bin/rm -f %{buildroot}%{_sysconfdir}/slon_tools.conf-sample
/bin/rm -f %{buildroot}%{_bindir}/slon_tools.conf-sample
#/bin/rm -f %{buildroot}%{_libdir}/pgsql/slon-tools.pm
/bin/rm -f %{buildroot}%{_bindir}/slon-tools.pm
/bin/rm -f %{buildroot}%{_bindir}/slon-tools
/bin/rm -f %{buildroot}%{_bindir}/pgsql/slon-tools
%endif
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc COPYRIGHT UPGRADING HISTORY-1.1 INSTALL SAMPLE RELEASE-1.2.1 RELEASE-1.2.2
%{_bindir}/*
%{_libdir}/pgsql/slony1_funcs.so
%{_libdir}/pgsql/xxid.so
%{_datadir}/pgsql/*.sql
%config(noreplace) %{_sysconfdir}/slon.conf
%{_sysconfdir}/init.d/slon
%if %perltools
%{_libdir}/pgsql/slon-tools.pm
%config(noreplace) %{_sysconfdir}/slon_tools.conf
%endif
%if %docs
%files docs
%defattr(-,root,root,-)
%doc doc/adminguide doc/concept doc/howto doc/implementation doc/support
%endif
%changelog
* Thu May 17 2007 Devrim Gunduz
- Fix rpm build problem when the system has pg_config in both under
/usr/local/pgsql/bin and /usr/bin
* Wed Mar 22 2007 Christopher Browne
- Added more recent release notes
* Wed Mar 7 2007 Christopher Browne
- Added more recent release notes
* Thu Jan 4 2007 Devrim Gunduz
- Add docs package (It should be added before but...)
* Wed Nov 8 2006 Devrim Gunduz
- On 64-bit boxes, both 32 and 64 bit -devel packages may be installed.
Fix version check script
- Revert tar name patch
- Macros cannot be used in various parts of the spec file. Revert that commit
- Spec file cleanup
* Tue Oct 31 2006 Trevor Astrope
- Fixup tar name and install slon-tools as slon-tools.pm
* Mon Jul 17 2006 Devrim Gunduz postgresql-slony1-engine
- Updated spec and cleaned up rpmlint errors and warnings
* Wed Dec 21 2005 Devrim Gunduz postgresql-slony1-engine
- Added a buildrhel3 macro to fix RHEL 3 RPM builds
- Added a kerbdir macro
* Wed Dec 14 2005 Devrim Gunduz postgresql-slony1-engine
- Fixed the spec file so that during upgrade, conf files will not be replaced, and a .rpmnew will be created.
* Thu Nov 24 2005 Devrim Gunduz postgresql-slony1-engine
- Created bindir
* Wed Oct 26 2005 Devrim Gunduz postgresql-slony1-engine
- Modify CPPFLAGS and CFLAGS to fix builds on RHEL -- Per Philip Yarra
* Tue Oct 18 2005 Devrim Gunduz postgresql-slony1-engine
- Created a new package : -docs and moved all the docs there.
* Tue Oct 18 2005 Devrim Gunduz postgresql-slony1-engine
- Fixed the problem in http://gborg.postgresql.org/pipermail/slony1-general/2005-October/003105.html
* Sat Oct 01 2005 Devrim Gunduz postgresql-slony1-engine
- Upgrade to 1.1.1
* Tue Jul 12 2005 Devrim Gunduz postgresql-slony1-engine
- Added a line to check postgresql RPM version and tag SlonyI RPM with it.
- Updated Requires files so that it checks correct PostgreSQL version
- Moved autoconf line into correct place.
* Thu Jun 08 2005 Devrim Gunduz postgresql-slony1-engine
- Added UPGRADING, HISTORY-1.1, INSTALL, SAMPLE among installed files, reflecting the change in GNUMakefile.in
* Thu Jun 02 2005 Devrim Gunduz postgresql-slony1-engine
- Apply a new %docs macro and disable building of docs by default.
- Remove slon-tools.conf-sample from bindir.
- Removed --bindir and --libdir, since they are not needed.
* Mon Apr 10 2005 Devrim Gunduz postgresql-slony1-engine
- More fixes on RPM builds
* Thu Apr 07 2005 Devrim Gunduz postgresql-slony1-engine
- More fixes on RPM builds
* Tue Apr 04 2005 Devrim Gunduz postgresql-slony1-engine
- Fix RPM build errors, regarding to tools/ .
* Thu Apr 02 2005 Devrim Gunduz postgresql-slony1-engine
- Added docs to installed files list.
- Added perltools, so that tools/altperl may be compiled.
- Updated the spec file
* Thu Mar 17 2005 Devrim Gunduz postgresql-slony1-engine
- Update to 1.1.0beta1
- Remove PostgreSQL source dependency
* Thu Mar 17 2005 Devrim Gunduz postgresql-slony1-engine
- Fix RPM builds
* Thu Mar 18 2004 Daniel Berrange postgresql-slony1-engine
- Initial RPM packaging
--- postgresql-slony1-engine.spec.in DELETED ---
Index: configure.ac
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/configure.ac,v
retrieving revision 1.61
retrieving revision 1.62
diff -C2 -d -r1.61 -r1.62
*** configure.ac 2 May 2007 21:36:17 -0000 1.61
--- configure.ac 14 Apr 2008 10:35:01 -0000 1.62
***************
*** 244,248 ****
AC_OUTPUT([
! postgresql-slony1-engine.spec
Makefile.port:makefiles/Makefile.${template}
])
--- 244,248 ----
AC_OUTPUT([
! slony1.spec
Makefile.port:makefiles/Makefile.${template}
])
Index: configure
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/configure,v
retrieving revision 1.73
retrieving revision 1.74
diff -C2 -d -r1.73 -r1.74
*** configure 4 Oct 2007 15:29:41 -0000 1.73
--- configure 14 Apr 2008 10:35:01 -0000 1.74
***************
*** 10668,10672 ****
! ac_config_files="$ac_config_files postgresql-slony1-engine.spec Makefile.port:makefiles/Makefile.${template}"
cat >confcache <<\_ACEOF
--- 10668,10672 ----
! ac_config_files="$ac_config_files slony1.spec Makefile.port:makefiles/Makefile.${template}"
cat >confcache <<\_ACEOF
***************
*** 11225,11229 ****
"Makefile.global") CONFIG_FILES="$CONFIG_FILES Makefile.global" ;;
"GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
! "postgresql-slony1-engine.spec") CONFIG_FILES="$CONFIG_FILES postgresql-slony1-engine.spec" ;;
"Makefile.port") CONFIG_FILES="$CONFIG_FILES Makefile.port:makefiles/Makefile.${template}" ;;
--- 11225,11229 ----
"Makefile.global") CONFIG_FILES="$CONFIG_FILES Makefile.global" ;;
"GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
! "slony1.spec") CONFIG_FILES="$CONFIG_FILES slony1.spec" ;;
"Makefile.port") CONFIG_FILES="$CONFIG_FILES Makefile.port:makefiles/Makefile.${template}" ;;
Index: INSTALL
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/INSTALL,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** INSTALL 4 Dec 2006 07:12:49 -0000 1.14
--- INSTALL 14 Apr 2008 10:35:01 -0000 1.15
***************
*** 148,152 ****
authentication draws in a dependancy on Kerberos that isn't
automatically detected. You may need to add an -I path for
! /usr/kerberos/include; see postgresql-slony1-engine.spec for more
details.
--- 148,152 ----
authentication draws in a dependancy on Kerberos that isn't
automatically detected. You may need to add an -I path for
! /usr/kerberos/include; see slony1.spec for more
details.
From cbbrowne at lists.slony.info Wed Apr 16 14:23:56 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Wed Apr 16 14:23:58 2008
Subject: [Slony1-commit] slony1-engine/src/backend slony1_funcs.c
slony1_funcs.sql
Message-ID: <20080416212357.06673290108@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/src/backend
In directory main.slony.info:/tmp/cvs-serv2287/backend
Modified Files:
slony1_funcs.c slony1_funcs.sql
Log Message:
Rectify problem with DDL when hitting the following conditions:
- Running a DDL change that does updates on a replicated table
(e.g. - such as if you add a new column, and have to populate
it)
Error condition found:
- The denyaccess triggers *do* fire on the replica table;
there is nothing to suppress them
Solution:
- Change the denyaccess() function to check the replication
role GUC; it only needs to error out when in "origin" role;
if in "local" role (which is what slon sets, when running
DDL on a subscriber node), there is no problem.
- As above, when running "ONLY ON" a subscriber node
Error condition found:
- The DDL request is run by slonik, directly, and does not
set the session_replication_role to 'local'
Solution:
- Change the ddlscript_prepare(), when running ONLY ON, and
on a non-origin node, to set the session_replication_role to 'local'
Index: slony1_funcs.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/backend/slony1_funcs.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -C2 -d -r1.64 -r1.65
*** slony1_funcs.c 27 Mar 2008 15:01:54 -0000 1.64
--- slony1_funcs.c 16 Apr 2008 21:23:54 -0000 1.65
***************
*** 846,853 ****
elog(ERROR, "Slony-I: SPI_connect() failed in denyAccess()");
! elog(ERROR,
! "Slony-I: Table %s is replicated and cannot be "
! "modified on a subscriber node",
! NameStr(tg->tg_relation->rd_rel->relname));
SPI_finish();
--- 846,860 ----
elog(ERROR, "Slony-I: SPI_connect() failed in denyAccess()");
! /*
! * If the replication role is:
! * ORIGIN - default role --> FAIL
! * REPLICA - this trigger will not fire in --> N/A
! * LOCAL - role when running "local updates" --> PERMIT UPDATE
! */
! if (SessionReplicationRole == SESSION_REPLICATION_ROLE_ORIGIN)
! elog(ERROR,
! "Slony-I: Table %s is replicated and cannot be "
! "modified on a subscriber node - role=%d",
! NameStr(tg->tg_relation->rd_rel->relname), SessionReplicationRole);
SPI_finish();
Index: slony1_funcs.sql
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/backend/slony1_funcs.sql,v
retrieving revision 1.135
retrieving revision 1.136
diff -C2 -d -r1.135 -r1.136
*** slony1_funcs.sql 11 Apr 2008 15:08:19 -0000 1.135
--- slony1_funcs.sql 16 Apr 2008 21:23:54 -0000 1.136
***************
*** 3598,3601 ****
--- 3598,3608 ----
-- ----
perform @NAMESPACE@.createEvent(''_@CLUSTERNAME@'', ''SYNC'', NULL);
+ else
+ -- If running "ONLY ON NODE", there are two possibilities:
+ -- 1. Running on origin, where denyaccess() triggers are already shut off
+ -- 2. Running on replica, where we need the LOCAL role to suppress denyaccess() triggers
+ if (v_set_origin <> @NAMESPACE@.getLocalNodeId(''_@CLUSTERNAME@'') then
+ set session_replication_role to local;
+ end if
end if;
return 1;
From cbbrowne at lists.slony.info Fri Apr 18 09:14:44 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Fri Apr 18 09:14:46 2008
Subject: [Slony1-commit] slony1-engine/doc/adminguide firstdb.sgml
Message-ID: <20080418161444.5C420290146@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/doc/adminguide
In directory main.slony.info:/tmp/cvs-serv10605
Modified Files:
firstdb.sgml
Log Message:
Fixes to altperl example, per bug #48
Also a rewording of material about altperl
Index: firstdb.sgml
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/doc/adminguide/firstdb.sgml,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** firstdb.sgml 24 Mar 2008 15:57:34 -0000 1.26
--- firstdb.sgml 18 Apr 2008 16:14:42 -0000 1.27
***************
*** 160,196 ****
procedures in the master/slave (node) databases.
- Using the altperl scripts
-
- altperl script usage
-
-
- Using the scripts is an easy way to get started. The
- slonik_build_env script will generate output providing
- details you need to omplete building a slon_tools.conf.
- An example slon_tools.conf is provided in the distribution
- to get you started. The altperl scripts will all reference
- this central configuration file in the future to ease administration. Once
- slon_tools.conf has been created, you can proceed as follows:
-
-
-
- # Initialize cluster:
- $ slonik_init_cluster | slonik
-
- # Start slon (here 1 and 2 are node numbers)
- $ slon_start 1
- $ slon_start 2
-
- # Create Sets (here 1 is a set number)
- $ slonik_create_set 1
-
- # subscribe set to second node (1= set ID, 2= node ID)
- $ slonik_subscribe_set 2 | slonik
-
-
- You have now replicated your first database. You can skip the following section
- of documentation if you'd like, which documents more of a bare-metal
approach.
-
-
Using slonik command directly
--- 160,163 ----
***************
*** 391,394 ****
--- 358,400 ----
diagnostic information including the logs generated by &lslon;
processes and the output of <eststate;.
+
+ Using the altperl scripts
+
+ altperl script example
+
+
+ Using the scripts is an alternative way to
+ get started; it allows you to avoid writing slonik scripts, at least
+ for some of the simple ways of configuring &slony1;. The
+ slonik_build_env script will generate output
+ providing details you need to build a
+ slon_tools.conf, which is required by these
+ scripts. An example slon_tools.conf is provided
+ in the distribution to get you started. The altperl scripts all
+ reference this central configuration file centralize cluster
+ configuration information. Once slon_tools.conf has been created, you
+ can proceed as follows:
+
+
+
+ # Initialize cluster:
+ $ slonik_init_cluster | slonik
+
+ # Start slon (here 1 and 2 are node numbers)
+ $ slon_start 1
+ $ slon_start 2
+
+ # Create Sets (here 1 is a set number)
+ $ slonik_create_set 1 | slonik
+
+ # subscribe set to second node (1= set ID, 2= node ID)
+ $ slonik_subscribe_set 2 | slonik
+
+
+ You have now replicated your first database. You can skip the
+ following section of documentation if you'd like, which documents more
+ of a bare-metal
approach.
+
+
From cbbrowne at lists.slony.info Fri Apr 18 09:53:13 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Fri Apr 18 09:53:15 2008
Subject: [Slony1-commit] slony1-engine/doc/adminguide triggers.sgml
Message-ID: <20080418165313.3EF6629010D@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/doc/adminguide
In directory main.slony.info:/tmp/cvs-serv13576
Modified Files:
triggers.sgml
Log Message:
Improve trigger documentation for v2.0
Index: triggers.sgml
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/doc/adminguide/triggers.sgml,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** triggers.sgml 28 Jan 2008 19:35:21 -0000 1.1
--- triggers.sgml 18 Apr 2008 16:53:11 -0000 1.2
***************
*** 138,146 ****
This may be expected to allow DDL changes to become
! enormously less expensive, since, rather than needing to
! take out exclusive locks on all replicated tables (as used
! to be mandated by the action of dropping and adding back the
! &slony1;-created triggers), the only tables that are locked are those
! ones that the DDL script was specifically acting on.
--- 138,147 ----
This may be expected to allow DDL changes to become
! enormously less expensive, since, rather than
! needing to take out exclusive locks on all
! replicated tables (as used to be mandated by the action of dropping
! and adding back the &slony1;-created triggers), the only tables that
! are locked are those ones that the DDL script was specifically acting
! on.
***************
*** 159,164 ****
From a locking perspective, this will not behave differently
! from older versions of &slony1;; the locking that takes place here is
! quite necessary.
--- 160,166 ----
From a locking perspective, this will not behave differently
! from older versions of &slony1;; to disable and enable the respective
! triggers requires taking out exclusive locks on all replicated
! tables.
***************
*** 169,173 ****
denyaccess triggers, and enabling the
logtrigger triggers. The locking implications
! are again, much the same.
--- 171,176 ----
denyaccess triggers, and enabling the
logtrigger triggers. The locking implications
! are again, much the same, requiring an exclusive lock on each such
! table.
From cbbrowne at lists.slony.info Mon Apr 21 09:33:31 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Mon Apr 21 09:33:32 2008
Subject: [Slony1-commit] slony1-engine/src/xxid .cvsignore Makefile xxid.c
xxid.v83.sql
Message-ID: <20080421163331.621602902E7@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/src/xxid
In directory main.slony.info:/tmp/cvs-serv25093/xxid
Removed Files:
.cvsignore Makefile xxid.c xxid.v83.sql
Log Message:
Remove xxid from source tree - no longer needed, as the functionality
formerly provided is now in PostgreSQL "core" in v8.3+
--- .cvsignore DELETED ---
--- Makefile DELETED ---
--- xxid.v83.sql DELETED ---
--- xxid.c DELETED ---
From cbbrowne at lists.slony.info Mon Apr 21 09:34:56 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Mon Apr 21 09:34:58 2008
Subject: [Slony1-commit] slony1-engine RELEASE-2.0
Message-ID: <20080421163456.C8779290146@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine
In directory main.slony.info:/tmp/cvs-serv25125
Modified Files:
RELEASE-2.0
Log Message:
Note removal of xxid (and remove from src/Makefile)
Index: RELEASE-2.0
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/RELEASE-2.0,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** RELEASE-2.0 11 Apr 2008 15:44:22 -0000 1.15
--- RELEASE-2.0 21 Apr 2008 16:34:54 -0000 1.16
***************
*** 113,116 ****
--- 113,118 ----
changes in the coding of the regression tests.
+ This eliminates the src/xxid directory and contents
+
- All of the interesting cleanup work is now done in the stored
function, cleanupEvent(interval, boolean).
***************
*** 184,186 ****
- WAIT FOR EVENT - WAIT ON
- FAILOVER - BACKUP NODE
! - EXECUTE SCRIPT - EVENT NODE
\ No newline at end of file
--- 186,188 ----
- WAIT FOR EVENT - WAIT ON
- FAILOVER - BACKUP NODE
! - EXECUTE SCRIPT - EVENT NODE
From cbbrowne at lists.slony.info Mon Apr 21 09:34:56 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Mon Apr 21 09:34:58 2008
Subject: [Slony1-commit] slony1-engine/src Makefile
Message-ID: <20080421163456.DA41829015A@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/src
In directory main.slony.info:/tmp/cvs-serv25125/src
Modified Files:
Makefile
Log Message:
Note removal of xxid (and remove from src/Makefile)
Index: Makefile
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/Makefile,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** Makefile 26 Oct 2007 18:36:05 -0000 1.15
--- Makefile 21 Apr 2008 16:34:54 -0000 1.16
***************
*** 13,17 ****
DISTFILES = Makefile
! SUBDIRS = xxid parsestatements slon slonik backend ducttape
ifeq ($(PORTNAME),win32)
SUBDIRS += slevent
--- 13,17 ----
DISTFILES = Makefile
! SUBDIRS = parsestatements slon slonik backend ducttape
ifeq ($(PORTNAME),win32)
SUBDIRS += slevent
From cbbrowne at lists.slony.info Mon Apr 21 09:37:55 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Mon Apr 21 09:37:56 2008
Subject: [Slony1-commit] slony1-engine slony1.spec.in
Message-ID: <20080421163755.3AE90290172@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine
In directory main.slony.info:/tmp/cvs-serv25561
Modified Files:
slony1.spec.in
Log Message:
Remove references to src/xxid, obsolete as of Slony-I 2.0
Index: slony1.spec.in
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/slony1.spec.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** slony1.spec.in 14 Apr 2008 10:35:01 -0000 1.1
--- slony1.spec.in 21 Apr 2008 16:37:53 -0000 1.2
***************
*** 84,90 ****
make %{?_smp_mflags} DESTDIR=%{buildroot} install
install -m 0755 src/backend/slony1_funcs.so %{buildroot}%{_libdir}/pgsql/slony1_funcs.so
- install -m 0755 src/xxid/xxid.so %{buildroot}%{_libdir}/pgsql/xxid.so
install -m 0644 src/backend/*.sql %{buildroot}%{_datadir}/pgsql/
- install -m 0644 src/xxid/*.sql %{buildroot}%{_datadir}/pgsql/
install -m 0755 tools/*.sh %{buildroot}%{_bindir}/
install -m 0644 share/slon.conf-sample %{buildroot}%{_sysconfdir}/slon.conf
--- 84,88 ----
***************
*** 111,118 ****
%files
%defattr(-,root,root,-)
! %doc COPYRIGHT UPGRADING HISTORY-1.1 INSTALL SAMPLE RELEASE-1.2.1 RELEASE-1.2.2
%{_bindir}/*
%{_libdir}/pgsql/slony1_funcs.so
- %{_libdir}/pgsql/xxid.so
%{_datadir}/pgsql/*.sql
%config(noreplace) %{_sysconfdir}/slon.conf
--- 109,115 ----
%files
%defattr(-,root,root,-)
! %doc COPYRIGHT UPGRADING HISTORY-1.1 INSTALL SAMPLE RELEASE-2.0
%{_bindir}/*
%{_libdir}/pgsql/slony1_funcs.so
%{_datadir}/pgsql/*.sql
%config(noreplace) %{_sysconfdir}/slon.conf
From cbbrowne at lists.slony.info Mon Apr 21 09:37:55 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Mon Apr 21 09:37:57 2008
Subject: [Slony1-commit] slony1-engine/suse postgresql-slony1-engine.specfile
Message-ID: <20080421163755.5E305290321@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/suse
In directory main.slony.info:/tmp/cvs-serv25561/suse
Modified Files:
postgresql-slony1-engine.specfile
Log Message:
Remove references to src/xxid, obsolete as of Slony-I 2.0
Index: postgresql-slony1-engine.specfile
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/suse/postgresql-slony1-engine.specfile,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** postgresql-slony1-engine.specfile 22 Oct 2005 16:02:43 -0000 1.3
--- postgresql-slony1-engine.specfile 21 Apr 2008 16:37:53 -0000 1.4
***************
*** 71,77 ****
make DESTDIR=$RPM_BUILD_ROOT install
install -m 0755 src/backend/slony1_funcs.so $RPM_BUILD_ROOT%{_libdir}/postgresql/slony1_funcs.so
- install -m 0755 src/xxid/xxid.so $RPM_BUILD_ROOT%{_libdir}/postgresql/xxid.so
install -m 0755 src/backend/*.sql $RPM_BUILD_ROOT%{_datadir}/postgresql/
- install -m 0755 src/xxid/*.sql $RPM_BUILD_ROOT%{_datadir}/postgresql/
install -m 0755 tools/*.sh $RPM_BUILD_ROOT%{_bindir}/
install -m 0755 share/slon.conf-sample $RPM_BUILD_ROOT%{_sysconfdir}/slon.conf
--- 71,75 ----
***************
*** 96,104 ****
%defattr(-,root,root,-)
%if %docs
! %doc COPYRIGHT UPGRADING HISTORY-1.1 INSTALL SAMPLE doc/adminguide doc/concept doc/howto doc/implementation doc/support
%endif
%{_bindir}/*
%{_libdir}/postgresql/slony1_funcs.so
- %{_libdir}/postgresql/xxid.so
%{_datadir}/postgresql/*.sql
%{_sysconfdir}/slon.conf
--- 94,101 ----
%defattr(-,root,root,-)
%if %docs
! %doc COPYRIGHT UPGRADING RELEASE-2.0 INSTALL SAMPLE doc/adminguide doc/concept doc/howto doc/implementation doc/support
%endif
%{_bindir}/*
%{_libdir}/postgresql/slony1_funcs.so
%{_datadir}/postgresql/*.sql
%{_sysconfdir}/slon.conf
From cbbrowne at lists.slony.info Mon Apr 21 09:37:55 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Mon Apr 21 09:37:57 2008
Subject: [Slony1-commit] slony1-engine/redhat slony-I.specfile
Message-ID: <20080421163755.514E12901CD@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/redhat
In directory main.slony.info:/tmp/cvs-serv25561/redhat
Modified Files:
slony-I.specfile
Log Message:
Remove references to src/xxid, obsolete as of Slony-I 2.0
Index: slony-I.specfile
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/redhat/slony-I.specfile,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** slony-I.specfile 21 Dec 2005 15:02:55 -0000 1.6
--- slony-I.specfile 21 Apr 2008 16:37:53 -0000 1.7
***************
*** 87,93 ****
make DESTDIR=$RPM_BUILD_ROOT install
install -m 0755 src/backend/slony1_funcs.so $RPM_BUILD_ROOT%{_libdir}/pgsql/slony1_funcs.so
- install -m 0755 src/xxid/xxid.so $RPM_BUILD_ROOT%{_libdir}/pgsql/xxid.so
install -m 0755 src/backend/*.sql $RPM_BUILD_ROOT%{_datadir}/pgsql/
- install -m 0755 src/xxid/*.sql $RPM_BUILD_ROOT%{_datadir}/pgsql/
install -m 0755 tools/*.sh $RPM_BUILD_ROOT%{_bindir}/
install -m 0755 share/slon.conf-sample $RPM_BUILD_ROOT%{_sysconfdir}/slon.conf
--- 87,91 ----
***************
*** 113,117 ****
%{_bindir}/*
%{_libdir}/pgsql/slony1_funcs.so
- %{_libdir}/pgsql/xxid.so
%{_datadir}/pgsql/*.sql
%config(noreplace) %{_sysconfdir}/slon.conf
--- 111,114 ----
From cbbrowne at lists.slony.info Mon Apr 21 14:31:25 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Mon Apr 21 14:31:27 2008
Subject: [Slony1-commit] slony1-engine/doc/adminguide bestpractices.sgml
Message-ID: <20080421213125.57F472901C3@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/doc/adminguide
In directory main.slony.info:/tmp/cvs-serv15446
Modified Files:
bestpractices.sgml
Log Message:
Add in note about increasing sync interval when running long subscriptions
Index: bestpractices.sgml
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/doc/adminguide/bestpractices.sgml,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** bestpractices.sgml 24 Mar 2008 15:57:34 -0000 1.33
--- bestpractices.sgml 21 Apr 2008 21:31:23 -0000 1.34
***************
*** 300,305 ****
lock on them; doing so via execute script requires
that &slony1; take out an exclusive lock on all
! replicated tables. This can prove quite inconvenient when
! applications are running; you run into deadlocks and such.
One particularly dogmatic position that some hold is that
--- 300,308 ----
lock on them; doing so via execute script requires
that &slony1; take out an exclusive lock on all
! replicated tables. This can prove quite inconvenient if applications
! are running when running DDL; &slony1; is asking for those exclusive
! table locks, whilst, simultaneously, some application connections are
! gradually relinquishing locks, whilst others are backing up behind the
! &slony1; locks.
One particularly dogmatic position that some hold is that
***************
*** 516,519 ****
--- 519,531 ----
user out of the new subscriber because:
+
+ It is also a very good idea to change &lslon; configuration for
+ on the origin node to
+ reduce how many SYNC events are generated. If the
+ subscription takes 8 hours, there is little sense in there being 28800
+ SYNCs waiting to be applied. Running a
+ SYNC every minute or so is likely to make catching
+ up easier.
+
From cbbrowne at lists.slony.info Mon Apr 21 14:32:58 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Mon Apr 21 14:32:59 2008
Subject: [Slony1-commit] slony1-engine/doc/adminguide faq.sgml
Message-ID: <20080421213258.840AA290165@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/doc/adminguide
In directory main.slony.info:/tmp/cvs-serv15587
Modified Files:
faq.sgml
Log Message:
Add to the FAQ a list of "impossible things" that people seem to keep asking for.
Index: faq.sgml
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/doc/adminguide/faq.sgml,v
retrieving revision 1.77
retrieving revision 1.78
diff -C2 -d -r1.77 -r1.78
*** faq.sgml 11 Apr 2008 14:55:14 -0000 1.77
--- faq.sgml 21 Apr 2008 21:32:56 -0000 1.78
***************
*** 367,371 ****
!
&slony1; FAQ: Connection Issues
--- 367,432 ----
!
!
! &slony1; FAQ: Impossible Things People Try
!
!
! Can I use &slony1; to replicate changes back and forth on my database between my two offices?
!
! At one level, it is theoretically
! possible to do something like that, if you design your
! application so that each office has its own distinct set of tables,
! and you then have some system for consolidating the data to give them
! some common view. However, this requires a great deal of design work
! to create an application that performs this consolidation.
!
!
! In practice, the term for that is multimaster
! replication,
and &slony1; does not support multimaster
! replication.
!
!
!
!
! I want to replicate all of the databases for a shared-database system I am managing. There are multiple databases, being used by my customers.
!
! For this purpose, something like &postgres; PITR (Point
! In Time Recovery) is likely to be much more suitable. &slony1;
! requires a slon process (and multiple connections) for each
! identifiable database, and if you have a &postgres; cluster hosting 50
! or 100 databases, this will require hundreds of database connections.
! Typically, in shared hosting
situations, DML is being
! managed by customers, who can change anything they like whenever
! they want. &slony1; does not work out well when
! not used in a disciplined manner.
!
!
!
! I want to be able to make DDL changes, and have them replicated automatically.
!
! &slony1; requires that be planned for explicitly and carefully. &slony1; captures changes using triggers, and &postgres; does not provide a way to use triggers to capture DDL changes.
!
! There has been quite a bit of discussion, off and on, about how
! &postgres; might capture DDL changes in a way that would make triggers
! useful; nothing concrete has emerged after several years of
! discussion.
!
!
!
! I want to split my cluster into disjoint partitions that are not aware of one another. &slony1; keeps generating that link those partitions together.
!
! The notion that all nodes are aware of one another is
! deeply imbedded in the design of &slony1;. For instance, its handling
! of cleanup of obsolete data depends on being aware of whether any of
! the nodes are behind, and thus might still depend on older data.
!
!
!
!
! I want to change some of my node numbers. How do I rename
a node to have a different node number?
! You don't. The node number is used to coordinate inter-node communications, and changing the node ID number on the fly
would make it essentially impossible to keep node configuration coordinated.
!
!
!
&slony1; FAQ: Connection Issues
From cbbrowne at lists.slony.info Wed Apr 23 13:34:23 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Wed Apr 23 13:34:25 2008
Subject: [Slony1-commit] slony1-engine/src/slonik dbutil.c
Message-ID: <20080423203423.DE75F290145@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/src/slonik
In directory main.slony.info:/tmp/cvs-serv2058
Modified Files:
dbutil.c
Log Message:
Do not load xxid module - obsoleted by addition of txid functions in
PG 8.3
Index: dbutil.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slonik/dbutil.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** dbutil.c 5 Jun 2007 22:22:07 -0000 1.14
--- dbutil.c 23 Apr 2008 20:34:21 -0000 1.15
***************
*** 578,595 ****
/*
- * Check loading of xxid module
- */
- slon_mkquery(&query, "load '$libdir/xxid'; ");
- if (db_exec_command(stmt, adminfo, &query) < 0)
- {
- printf("%s:%d: Error: the extension for the xxid data type "
- "cannot be loaded in database '%s'\n",
- stmt->stmt_filename, stmt->stmt_lno,
- adminfo->conninfo);
- dstring_free(&query);
- return -1;
- }
-
- /*
* Check loading of slony1_funcs module
*/
--- 578,581 ----
From cbbrowne at lists.slony.info Wed Apr 23 13:35:45 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Wed Apr 23 13:35:48 2008
Subject: [Slony1-commit] slony1-engine/src/backend slony1_funcs.c
slony1_funcs.sql
Message-ID: <20080423203545.D7E8B290128@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/src/backend
In directory main.slony.info:/tmp/cvs-serv2424/backend
Modified Files:
slony1_funcs.c slony1_funcs.sql
Log Message:
Ran pgindent against C code
Index: slony1_funcs.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/backend/slony1_funcs.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -C2 -d -r1.65 -r1.66
*** slony1_funcs.c 16 Apr 2008 21:23:54 -0000 1.65
--- slony1_funcs.c 23 Apr 2008 20:35:43 -0000 1.66
***************
*** 4,8 ****
* The C functions and triggers portion of Slony-I.
*
! * Copyright (c) 2003-2007, PostgreSQL Global Development Group
* Author: Jan Wieck, Afilias USA INC.
*
--- 4,8 ----
* The C functions and triggers portion of Slony-I.
*
! * Copyright (c) 2003-2007, PostgreSQL Global Development Group
* Author: Jan Wieck, Afilias USA INC.
*
***************
*** 111,118 ****
struct slony_I_cluster_status *next;
! } Slony_I_ClusterStatus;
/*@null@*/
! static Slony_I_ClusterStatus *clusterStatusList = NULL;
static Slony_I_ClusterStatus *
getClusterStatus(Name cluster_name,
--- 111,118 ----
struct slony_I_cluster_status *next;
! } Slony_I_ClusterStatus;
/*@null@*/
! static Slony_I_ClusterStatus *clusterStatusList = NULL;
static Slony_I_ClusterStatus *
getClusterStatus(Name cluster_name,
***************
*** 176,180 ****
if (i >= PG_NARGS() || PG_ARGISNULL(i))
{
! argv[i - 1] = (Datum)0;
nulls[i - 1] = 'n';
}
--- 176,180 ----
if (i >= PG_NARGS() || PG_ARGISNULL(i))
{
! argv[i - 1] = (Datum) 0;
nulls[i - 1] = 'n';
}
***************
*** 221,224 ****
--- 221,225 ----
PG_RETURN_INT64(retval);
}
+
/*@+mustfreefresh@*/
***************
*** 265,269 ****
retval = palloc(VARHDRSZ + len);
! SET_VARSIZE(retval,VARHDRSZ + len);
memcpy(VARDATA(retval), SLONY_I_VERSION_STRING, len);
--- 266,270 ----
retval = palloc(VARHDRSZ + len);
! SET_VARSIZE(retval, VARHDRSZ + len);
memcpy(VARDATA(retval), SLONY_I_VERSION_STRING, len);
***************
*** 335,344 ****
if (!TransactionIdEquals(cs->currentXid, newXid))
{
! int32 log_status;
/*
* Determine the currently active log table
*/
! if(SPI_execp(cs->plan_get_logstatus, NULL, NULL, 0) < 0)
elog(ERROR, "Slony-I: cannot determine log status");
if (SPI_processed != 1)
--- 336,345 ----
if (!TransactionIdEquals(cs->currentXid, newXid))
{
! int32 log_status;
/*
* Determine the currently active log table
*/
! if (SPI_execp(cs->plan_get_logstatus, NULL, NULL, 0) < 0)
elog(ERROR, "Slony-I: cannot determine log status");
if (SPI_processed != 1)
***************
*** 346,364 ****
log_status = DatumGetInt32(SPI_getbinval(SPI_tuptable->vals[0],
! SPI_tuptable->tupdesc, 1, NULL));
SPI_freetuptable(SPI_tuptable);
! switch(log_status)
{
case 0:
! case 2: cs->plan_active_log = cs->plan_insert_log_1;
! break;
!
case 1:
! case 3: cs->plan_active_log = cs->plan_insert_log_2;
! break;
! default: elog(ERROR, "Slony-I: illegal log status %d", log_status);
! break;
}
--- 347,368 ----
log_status = DatumGetInt32(SPI_getbinval(SPI_tuptable->vals[0],
! SPI_tuptable->tupdesc, 1, NULL));
SPI_freetuptable(SPI_tuptable);
! switch (log_status)
{
case 0:
! case 2:
! cs->plan_active_log = cs->plan_insert_log_1;
! break;
!
case 1:
! case 3:
! cs->plan_active_log = cs->plan_insert_log_2;
! break;
! default:
! elog(ERROR, "Slony-I: illegal log status %d", log_status);
! break;
}
***************
*** 375,384 ****
char *col_ident;
char *col_value;
!
int len_ident;
int len_value;
int i;
int need_comma = false;
! char *OldDateStyle;
char *cp = VARDATA(cs->cmddata_buf);
--- 379,388 ----
char *col_ident;
char *col_value;
!
int len_ident;
int len_value;
int i;
int need_comma = false;
! char *OldDateStyle;
char *cp = VARDATA(cs->cmddata_buf);
***************
*** 402,416 ****
continue;
! col_ident = (char *)slon_quote_identifier(SPI_fname(tupdesc, i + 1));
! cmddata_need = (cp - (char *)(cs->cmddata_buf)) + 16 +
(len_ident = strlen(col_ident));
if (cs->cmddata_size < cmddata_need)
{
! int have = (cp - (char *)(cs->cmddata_buf));
while (cs->cmddata_size < cmddata_need)
cs->cmddata_size *= 2;
cs->cmddata_buf = realloc(cs->cmddata_buf, cs->cmddata_size);
! cp = (char *)(cs->cmddata_buf) + have;
}
--- 406,420 ----
continue;
! col_ident = (char *) slon_quote_identifier(SPI_fname(tupdesc, i + 1));
! cmddata_need = (cp - (char *) (cs->cmddata_buf)) + 16 +
(len_ident = strlen(col_ident));
if (cs->cmddata_size < cmddata_need)
{
! int have = (cp - (char *) (cs->cmddata_buf));
while (cs->cmddata_size < cmddata_need)
cs->cmddata_size *= 2;
cs->cmddata_buf = realloc(cs->cmddata_buf, cs->cmddata_size);
! cp = (char *) (cs->cmddata_buf) + have;
}
***************
*** 442,447 ****
*/
need_comma = false;
! OldDateStyle=GetConfigOptionByName("DateStyle", NULL);
! if (!strstr(OldDateStyle,"ISO"))
set_config_option("DateStyle", "ISO", PGC_USERSET, PGC_S_SESSION, true, true);
for (i = 0; i < tg->tg_relation->rd_att->natts; i++)
--- 446,451 ----
*/
need_comma = false;
! OldDateStyle = GetConfigOptionByName("DateStyle", NULL);
! if (!strstr(OldDateStyle, "ISO"))
set_config_option("DateStyle", "ISO", PGC_USERSET, PGC_S_SESSION, true, true);
for (i = 0; i < tg->tg_relation->rd_att->natts; i++)
***************
*** 463,476 ****
}
! cmddata_need = (cp - (char *)(cs->cmddata_buf)) + 16 +
(len_value = strlen(col_value));
if (cs->cmddata_size < cmddata_need)
{
! int have = (cp - (char *)(cs->cmddata_buf));
while (cs->cmddata_size < cmddata_need)
cs->cmddata_size *= 2;
cs->cmddata_buf = realloc(cs->cmddata_buf, cs->cmddata_size);
! cp = (char *)(cs->cmddata_buf) + have;
}
--- 467,480 ----
}
! cmddata_need = (cp - (char *) (cs->cmddata_buf)) + 16 +
(len_value = strlen(col_value));
if (cs->cmddata_size < cmddata_need)
{
! int have = (cp - (char *) (cs->cmddata_buf));
while (cs->cmddata_size < cmddata_need)
cs->cmddata_size *= 2;
cs->cmddata_buf = realloc(cs->cmddata_buf, cs->cmddata_size);
! cp = (char *) (cs->cmddata_buf) + have;
}
***************
*** 484,488 ****
}
! if (!strstr(OldDateStyle,"ISO"))
set_config_option("DateStyle", OldDateStyle, PGC_USERSET, PGC_S_SESSION, true, true);
--- 488,492 ----
}
! if (!strstr(OldDateStyle, "ISO"))
set_config_option("DateStyle", OldDateStyle, PGC_USERSET, PGC_S_SESSION, true, true);
***************
*** 492,497 ****
*cp++ = ')';
*cp = '\0';
! SET_VARSIZE(cs->cmddata_buf,
! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf)));
}
else if (TRIGGER_FIRED_BY_UPDATE(tg->tg_event))
--- 496,501 ----
*cp++ = ')';
*cp = '\0';
! SET_VARSIZE(cs->cmddata_buf,
! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf)));
}
else if (TRIGGER_FIRED_BY_UPDATE(tg->tg_event))
***************
*** 512,516 ****
int need_comma = false;
int need_and = false;
! char *OldDateStyle;
char *cp = VARDATA(cs->cmddata_buf);
--- 516,520 ----
int need_comma = false;
int need_and = false;
! char *OldDateStyle;
char *cp = VARDATA(cs->cmddata_buf);
***************
*** 519,524 ****
* UPDATE
*
! * cmdtype = 'U' cmddata = "col_ident"='value' [, ...] where "pk_ident" =
! * 'value' [ and ...]
*/
cmdtype = cs->cmdtype_U;
--- 523,528 ----
* UPDATE
*
! * cmdtype = 'U' cmddata = "col_ident"='value' [, ...] where
! * "pk_ident" = 'value' [ and ...]
*/
cmdtype = cs->cmdtype_U;
***************
*** 603,629 ****
need_comma = true;
! col_ident = (char *)slon_quote_identifier(SPI_fname(tupdesc, i + 1));
if (new_isnull)
col_value = "NULL";
else
{
! OldDateStyle=GetConfigOptionByName("DateStyle", NULL);
! if (!strstr(OldDateStyle,"ISO"))
set_config_option("DateStyle", "ISO", PGC_USERSET, PGC_S_SESSION, true, true);
col_value = slon_quote_literal(SPI_getvalue(new_row, tupdesc, i + 1));
! if (!strstr(OldDateStyle,"ISO"))
set_config_option("DateStyle", OldDateStyle, PGC_USERSET, PGC_S_SESSION, true, true);
}
! cmddata_need = (cp - (char *)(cs->cmddata_buf)) + 16 +
(len_ident = strlen(col_ident)) +
(len_value = strlen(col_value));
if (cs->cmddata_size < cmddata_need)
{
! int have = (cp - (char *)(cs->cmddata_buf));
while (cs->cmddata_size < cmddata_need)
cs->cmddata_size *= 2;
cs->cmddata_buf = realloc(cs->cmddata_buf, cs->cmddata_size);
! cp = (char *)(cs->cmddata_buf) + have;
}
--- 607,633 ----
need_comma = true;
! col_ident = (char *) slon_quote_identifier(SPI_fname(tupdesc, i + 1));
if (new_isnull)
col_value = "NULL";
else
{
! OldDateStyle = GetConfigOptionByName("DateStyle", NULL);
! if (!strstr(OldDateStyle, "ISO"))
set_config_option("DateStyle", "ISO", PGC_USERSET, PGC_S_SESSION, true, true);
col_value = slon_quote_literal(SPI_getvalue(new_row, tupdesc, i + 1));
! if (!strstr(OldDateStyle, "ISO"))
set_config_option("DateStyle", OldDateStyle, PGC_USERSET, PGC_S_SESSION, true, true);
}
! cmddata_need = (cp - (char *) (cs->cmddata_buf)) + 16 +
(len_ident = strlen(col_ident)) +
(len_value = strlen(col_value));
if (cs->cmddata_size < cmddata_need)
{
! int have = (cp - (char *) (cs->cmddata_buf));
while (cs->cmddata_size < cmddata_need)
cs->cmddata_size *= 2;
cs->cmddata_buf = realloc(cs->cmddata_buf, cs->cmddata_size);
! cp = (char *) (cs->cmddata_buf) + have;
}
***************
*** 653,670 ****
break;
}
! col_ident = (char *)slon_quote_identifier(SPI_fname(tupdesc, i + 1));
col_value = slon_quote_literal(SPI_getvalue(old_row, tupdesc, i + 1));
! cmddata_need = (cp - (char *)(cs->cmddata_buf)) + 16 +
(len_ident = strlen(col_ident)) +
(len_value = strlen(col_value));
if (cs->cmddata_size < cmddata_need)
{
! int have = (cp - (char *)(cs->cmddata_buf));
while (cs->cmddata_size < cmddata_need)
cs->cmddata_size *= 2;
cs->cmddata_buf = realloc(cs->cmddata_buf, cs->cmddata_size);
! cp = (char *)(cs->cmddata_buf) + have;
}
--- 657,674 ----
break;
}
! col_ident = (char *) slon_quote_identifier(SPI_fname(tupdesc, i + 1));
col_value = slon_quote_literal(SPI_getvalue(old_row, tupdesc, i + 1));
! cmddata_need = (cp - (char *) (cs->cmddata_buf)) + 16 +
(len_ident = strlen(col_ident)) +
(len_value = strlen(col_value));
if (cs->cmddata_size < cmddata_need)
{
! int have = (cp - (char *) (cs->cmddata_buf));
while (cs->cmddata_size < cmddata_need)
cs->cmddata_size *= 2;
cs->cmddata_buf = realloc(cs->cmddata_buf, cs->cmddata_size);
! cp = (char *) (cs->cmddata_buf) + have;
}
***************
*** 695,715 ****
if (attkind[attkind_idx] != 'k')
continue;
! col_ident = (char *)slon_quote_identifier(SPI_fname(tupdesc, i + 1));
col_value = slon_quote_literal(SPI_getvalue(old_row, tupdesc, i + 1));
if (col_value == NULL)
! elog(ERROR, "Slony-I: old key column %s.%s IS NULL on UPDATE",
! NameStr(tg->tg_relation->rd_rel->relname), col_ident);
! cmddata_need = (cp - (char *)(cs->cmddata_buf)) + 16 +
(len_ident = strlen(col_ident)) +
(len_value = strlen(col_value));
if (cs->cmddata_size < cmddata_need)
{
! int have = (cp - (char *)(cs->cmddata_buf));
while (cs->cmddata_size < cmddata_need)
cs->cmddata_size *= 2;
cs->cmddata_buf = realloc(cs->cmddata_buf, cs->cmddata_size);
! cp = (char *)(cs->cmddata_buf) + have;
}
--- 699,719 ----
if (attkind[attkind_idx] != 'k')
continue;
! col_ident = (char *) slon_quote_identifier(SPI_fname(tupdesc, i + 1));
col_value = slon_quote_literal(SPI_getvalue(old_row, tupdesc, i + 1));
if (col_value == NULL)
! elog(ERROR, "Slony-I: old key column %s.%s IS NULL on UPDATE",
! NameStr(tg->tg_relation->rd_rel->relname), col_ident);
! cmddata_need = (cp - (char *) (cs->cmddata_buf)) + 16 +
(len_ident = strlen(col_ident)) +
(len_value = strlen(col_value));
if (cs->cmddata_size < cmddata_need)
{
! int have = (cp - (char *) (cs->cmddata_buf));
while (cs->cmddata_size < cmddata_need)
cs->cmddata_size *= 2;
cs->cmddata_buf = realloc(cs->cmddata_buf, cs->cmddata_size);
! cp = (char *) (cs->cmddata_buf) + have;
}
***************
*** 733,737 ****
*cp = '\0';
SET_VARSIZE(cs->cmddata_buf,
! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf)));
}
else if (TRIGGER_FIRED_BY_DELETE(tg->tg_event))
--- 737,741 ----
*cp = '\0';
SET_VARSIZE(cs->cmddata_buf,
! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf)));
}
else if (TRIGGER_FIRED_BY_DELETE(tg->tg_event))
***************
*** 762,782 ****
if (attkind[attkind_idx] != 'k')
continue;
! col_ident = (char *)slon_quote_identifier(SPI_fname(tupdesc, i + 1));
col_value = slon_quote_literal(SPI_getvalue(old_row, tupdesc, i + 1));
if (col_value == NULL)
! elog(ERROR, "Slony-I: old key column %s.%s IS NULL on DELETE",
! NameStr(tg->tg_relation->rd_rel->relname), col_ident);
! cmddata_need = (cp - (char *)(cs->cmddata_buf)) + 16 +
(len_ident = strlen(col_ident)) +
(len_value = strlen(col_value));
if (cs->cmddata_size < cmddata_need)
{
! int have = (cp - (char *)(cs->cmddata_buf));
while (cs->cmddata_size < cmddata_need)
cs->cmddata_size *= 2;
cs->cmddata_buf = realloc(cs->cmddata_buf, cs->cmddata_size);
! cp = (char *)(cs->cmddata_buf) + have;
}
--- 766,786 ----
if (attkind[attkind_idx] != 'k')
continue;
! col_ident = (char *) slon_quote_identifier(SPI_fname(tupdesc, i + 1));
col_value = slon_quote_literal(SPI_getvalue(old_row, tupdesc, i + 1));
if (col_value == NULL)
! elog(ERROR, "Slony-I: old key column %s.%s IS NULL on DELETE",
! NameStr(tg->tg_relation->rd_rel->relname), col_ident);
! cmddata_need = (cp - (char *) (cs->cmddata_buf)) + 16 +
(len_ident = strlen(col_ident)) +
(len_value = strlen(col_value));
if (cs->cmddata_size < cmddata_need)
{
! int have = (cp - (char *) (cs->cmddata_buf));
while (cs->cmddata_size < cmddata_need)
cs->cmddata_size *= 2;
cs->cmddata_buf = realloc(cs->cmddata_buf, cs->cmddata_size);
! cp = (char *) (cs->cmddata_buf) + have;
}
***************
*** 800,804 ****
*cp = '\0';
SET_VARSIZE(cs->cmddata_buf,
! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf)));
}
else
--- 804,808 ----
*cp = '\0';
SET_VARSIZE(cs->cmddata_buf,
! VARHDRSZ + (cp - VARDATA(cs->cmddata_buf)));
}
else
***************
*** 847,860 ****
/*
! * If the replication role is:
! * ORIGIN - default role --> FAIL
! * REPLICA - this trigger will not fire in --> N/A
! * LOCAL - role when running "local updates" --> PERMIT UPDATE
! */
if (SessionReplicationRole == SESSION_REPLICATION_ROLE_ORIGIN)
! elog(ERROR,
! "Slony-I: Table %s is replicated and cannot be "
! "modified on a subscriber node - role=%d",
! NameStr(tg->tg_relation->rd_rel->relname), SessionReplicationRole);
SPI_finish();
--- 851,863 ----
/*
! * If the replication role is: ORIGIN - default role --> FAIL REPLICA -
! * this trigger will not fire in --> N/A LOCAL - role when running "local
! * updates" --> PERMIT UPDATE
! */
if (SessionReplicationRole == SESSION_REPLICATION_ROLE_ORIGIN)
! elog(ERROR,
! "Slony-I: Table %s is replicated and cannot be "
! "modified on a subscriber node - role=%d",
! NameStr(tg->tg_relation->rd_rel->relname), SessionReplicationRole);
SPI_finish();
***************
*** 893,897 ****
NameStr(tg->tg_relation->rd_rel->relname));
! return (Datum)0;
}
--- 896,900 ----
NameStr(tg->tg_relation->rd_rel->relname));
! return (Datum) 0;
}
***************
*** 933,939 ****
! typedef struct {
! int32 seqid;
! int64 seqval;
} SeqTrack_elem;
--- 936,943 ----
! typedef struct
! {
! int32 seqid;
! int64 seqval;
} SeqTrack_elem;
***************
*** 941,948 ****
seqtrack_cmp(void *seq1, void *seq2)
{
! return (((SeqTrack_elem *)seq1)->seqid - ((SeqTrack_elem *)seq2)->seqid);
}
! static void
seqtrack_free(void *seq)
{
--- 945,952 ----
seqtrack_cmp(void *seq1, void *seq2)
{
! return (((SeqTrack_elem *) seq1)->seqid - ((SeqTrack_elem *) seq2)->seqid);
}
! static void
seqtrack_free(void *seq)
{
***************
*** 954,961 ****
{
static AVLtree seqmem = AVL_INITIALIZER(seqtrack_cmp, seqtrack_free);
! AVLnode *node;
! SeqTrack_elem *elem;
! int32 seqid;
! int64 seqval;
seqid = PG_GETARG_INT32(0);
--- 958,965 ----
{
static AVLtree seqmem = AVL_INITIALIZER(seqtrack_cmp, seqtrack_free);
! AVLnode *node;
! SeqTrack_elem *elem;
! int32 seqid;
! int64 seqval;
seqid = PG_GETARG_INT32(0);
***************
*** 974,978 ****
* remember the current lastval and return it to the caller.
*/
! elem = (SeqTrack_elem *)malloc(sizeof(SeqTrack_elem));
elem->seqid = seqid;
elem->seqval = seqval;
--- 978,982 ----
* remember the current lastval and return it to the caller.
*/
! elem = (SeqTrack_elem *) malloc(sizeof(SeqTrack_elem));
elem->seqid = seqid;
elem->seqval = seqval;
***************
*** 983,988 ****
/*
! * This is a sequence seen before. If the value has changed
! * remember and return it. If it did not, return NULL.
*/
elem = AVL_DATA(node);
--- 987,992 ----
/*
! * This is a sequence seen before. If the value has changed remember and
! * return it. If it did not, return NULL.
*/
elem = AVL_DATA(node);
***************
*** 1017,1021 ****
while (len > 0)
{
! if ((wl = pg_mblen((unsigned char *)cp1)) != 1)
{
len -= wl;
--- 1021,1025 ----
while (len > 0)
{
! if ((wl = pg_mblen((unsigned char *) cp1)) != 1)
{
len -= wl;
***************
*** 1095,1100 ****
* identifier is safe or not... so be safe not sorry.
*
! * Note: ScanKeywordLookup() does case-insensitive comparison, but that's
! * fine, since we already know we have all-lower-case.
*/
if (ScanKeywordLookup(ident) != NULL)
--- 1099,1104 ----
* identifier is safe or not... so be safe not sorry.
*
! * Note: ScanKeywordLookup() does case-insensitive comparison, but
! * that's fine, since we already know we have all-lower-case.
*/
if (ScanKeywordLookup(ident) != NULL)
***************
*** 1105,1109 ****
return ident; /* no change needed */
! result = (char *)palloc(strlen(ident) + nquotes + 2 + 1);
optr = result;
--- 1109,1113 ----
return ident; /* no change needed */
! result = (char *) palloc(strlen(ident) + nquotes + 2 + 1);
optr = result;
***************
*** 1142,1146 ****
/* We have to convert to a C string to use quote_identifier */
len = VARSIZE(t) - VARHDRSZ;
! str = (char *)palloc(len + 1);
memcpy(str, VARDATA(t), len);
str[len] = '\0';
--- 1146,1150 ----
/* We have to convert to a C string to use quote_identifier */
len = VARSIZE(t) - VARHDRSZ;
! str = (char *) palloc(len + 1);
memcpy(str, VARDATA(t), len);
str[len] = '\0';
***************
*** 1265,1269 ****
makeString("txid_snapshot"));
! txid_snapshot_typid = typenameTypeId(NULL,txid_snapshot_typname, NULL);
/*
--- 1269,1273 ----
makeString("txid_snapshot"));
! txid_snapshot_typid = typenameTypeId(NULL, txid_snapshot_typname, NULL);
/*
***************
*** 1305,1319 ****
*/
sprintf(query,
! "insert into %s.sl_seqlog "
! "(seql_seqid, seql_origin, seql_ev_seqno, seql_last_value) "
! "select * from ("
! "select seq_id, %d, currval('%s.sl_event_seq'), seq_last_value "
! "from %s.sl_seqlastvalue "
! "where seq_origin = '%d') as FOO "
! "where NOT %s.seqtrack(seq_id, seq_last_value) IS NULL; ",
! cs->clusterident,
! cs->localNodeId, cs->clusterident,
! cs->clusterident, cs->localNodeId,
! cs->clusterident);
cs->plan_record_sequences = SPI_saveplan(SPI_prepare(query, 0, NULL));
--- 1309,1323 ----
*/
sprintf(query,
! "insert into %s.sl_seqlog "
! "(seql_seqid, seql_origin, seql_ev_seqno, seql_last_value) "
! "select * from ("
! "select seq_id, %d, currval('%s.sl_event_seq'), seq_last_value "
! "from %s.sl_seqlastvalue "
! "where seq_origin = '%d') as FOO "
! "where NOT %s.seqtrack(seq_id, seq_last_value) IS NULL; ",
! cs->clusterident,
! cs->localNodeId, cs->clusterident,
! cs->clusterident, cs->localNodeId,
! cs->clusterident);
cs->plan_record_sequences = SPI_saveplan(SPI_prepare(query, 0, NULL));
***************
*** 1361,1365 ****
elog(ERROR, "Slony-I: SPI_prepare() failed");
! /*@-nullderef@*/
/*
* Also create the 3 rather static text values for the log_cmdtype
--- 1365,1370 ----
elog(ERROR, "Slony-I: SPI_prepare() failed");
! /* @-nullderef@ */
!
/*
* Also create the 3 rather static text values for the log_cmdtype
***************
*** 1390,1394 ****
return cs;
! /*@+nullderef@*/
}
--- 1395,1399 ----
return cs;
! /* @+nullderef@ */
}
Index: slony1_funcs.sql
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/backend/slony1_funcs.sql,v
retrieving revision 1.136
retrieving revision 1.137
diff -C2 -d -r1.136 -r1.137
*** slony1_funcs.sql 16 Apr 2008 21:23:54 -0000 1.136
--- slony1_funcs.sql 23 Apr 2008 20:35:43 -0000 1.137
***************
*** 3602,3608 ****
-- 1. Running on origin, where denyaccess() triggers are already shut off
-- 2. Running on replica, where we need the LOCAL role to suppress denyaccess() triggers
! if (v_set_origin <> @NAMESPACE@.getLocalNodeId(''_@CLUSTERNAME@'') then
! set session_replication_role to local;
! end if
end if;
return 1;
--- 3602,3608 ----
-- 1. Running on origin, where denyaccess() triggers are already shut off
-- 2. Running on replica, where we need the LOCAL role to suppress denyaccess() triggers
! if (v_set_origin <> @NAMESPACE@.getLocalNodeId(''_@CLUSTERNAME@'')) then
! execute ''set session_replication_role to local;'';
! end if;
end if;
return 1;
From cbbrowne at lists.slony.info Wed Apr 23 13:35:45 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Wed Apr 23 13:35:49 2008
Subject: [Slony1-commit] slony1-engine/src/misc avl_tree.c avl_tree.h
Message-ID: <20080423203545.E36D829012D@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/src/misc
In directory main.slony.info:/tmp/cvs-serv2424/misc
Modified Files:
avl_tree.c avl_tree.h
Log Message:
Ran pgindent against C code
Index: avl_tree.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/misc/avl_tree.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** avl_tree.c 7 Jun 2007 13:01:10 -0000 1.1
--- avl_tree.c 23 Apr 2008 20:35:43 -0000 1.2
***************
*** 4,11 ****
* AVL style self balancing tree support.
*
! * Copyright (c) 2007, PostgreSQL Global Development Group
! * Author: Jan Wieck, Afilias USA INC.
*
! * $Id$
* ----------------------------------------------------------------------
*/
--- 4,11 ----
* AVL style self balancing tree support.
*
! * Copyright (c) 2007, PostgreSQL Global Development Group
! * Author: Jan Wieck, Afilias USA INC.
*
! * $Id$
* ----------------------------------------------------------------------
*/
***************
*** 17,26 ****
* ----
*/
! static AVLnode *avl_makenode(void);
! static void avl_reset_node(AVLnode *node, AVLfreefunc *freefunc);
! static int avl_insertinto(AVLtree *tree, AVLnode **node,
! void *cdata, AVLnode **result);
! static void avl_rotate_left(AVLnode **node);
! static void avl_rotate_right(AVLnode **node);
--- 17,26 ----
* ----
*/
! static AVLnode *avl_makenode(void);
! static void avl_reset_node(AVLnode *node, AVLfreefunc *freefunc);
! static int avl_insertinto(AVLtree *tree, AVLnode **node,
! void *cdata, AVLnode **result);
! static void avl_rotate_left(AVLnode **node);
! static void avl_rotate_right(AVLnode **node);
***************
*** 64,68 ****
/* ----
! * avl_reset_node() -
*
* avl_reset()'s workhorse.
--- 64,68 ----
/* ----
! * avl_reset_node() -
*
* avl_reset()'s workhorse.
***************
*** 74,78 ****
if (node == NULL)
return;
!
avl_reset_node(node->lnode, freefunc);
avl_reset_node(node->rnode, freefunc);
--- 74,78 ----
if (node == NULL)
return;
!
avl_reset_node(node->lnode, freefunc);
avl_reset_node(node->rnode, freefunc);
***************
*** 96,100 ****
avl_insert(AVLtree *tree, void *cdata)
{
! AVLnode *result;
int depth;
--- 96,100 ----
avl_insert(AVLtree *tree, void *cdata)
{
! AVLnode *result;
int depth;
***************
*** 123,127 ****
avl_lookup(AVLtree *tree, void *cdata)
{
! AVLnode *node;
int cmp;
--- 123,127 ----
avl_lookup(AVLtree *tree, void *cdata)
{
! AVLnode *node;
int cmp;
***************
*** 133,138 ****
{
/*
! * Found the node. If it is marked deleted, return NULL
! * anyway. Otherwise return this node.
*/
if (node->deleted)
--- 133,138 ----
{
/*
! * Found the node. If it is marked deleted, return NULL anyway.
! * Otherwise return this node.
*/
if (node->deleted)
***************
*** 170,174 ****
avl_delete(AVLtree *tree, void *cdata)
{
! AVLnode *node;
if ((node = avl_lookup(tree, cdata)) == NULL)
--- 170,174 ----
avl_delete(AVLtree *tree, void *cdata)
{
! AVLnode *node;
if ((node = avl_lookup(tree, cdata)) == NULL)
***************
*** 186,199 ****
* ----
*/
! static int
avl_insertinto(AVLtree *tree, AVLnode **node,
! void *cdata, AVLnode **result)
{
! int cmp;
/*
* Compare the node at hand with the new elements key.
*/
! cmp = (tree->compfunc)(cdata, (*node)->cdata);
if (cmp > 0)
--- 186,199 ----
* ----
*/
! static int
avl_insertinto(AVLtree *tree, AVLnode **node,
! void *cdata, AVLnode **result)
{
! int cmp;
/*
* Compare the node at hand with the new elements key.
*/
! cmp = (tree->compfunc) (cdata, (*node)->cdata);
if (cmp > 0)
***************
*** 204,212 ****
if ((*node)->rnode == NULL)
{
! /*
! * Right side of current node is empty. Create a new node
! * there and return new maximum depth. Note that this can
! * only be 1 because otherwise this node would have been
! * unbalanced before.
*/
(*node)->rnode = *result = avl_makenode();
--- 204,211 ----
if ((*node)->rnode == NULL)
{
! /*
! * Right side of current node is empty. Create a new node there
! * and return new maximum depth. Note that this can only be 1
! * because otherwise this node would have been unbalanced before.
*/
(*node)->rnode = *result = avl_makenode();
***************
*** 216,228 ****
/*
! * Right hand node exists. Recurse into that and remember the
! * new right hand side depth.
*/
! (*node)->rdepth = avl_insertinto(tree, &((*node)->rnode),
! cdata, result) + 1;
/*
! * A right hand side insert can unbalance this node only to the
! * right.
*/
if (AVL_BALANCE(*node) > 1)
--- 215,226 ----
/*
! * Right hand node exists. Recurse into that and remember the new
! * right hand side depth.
*/
! (*node)->rdepth = avl_insertinto(tree, &((*node)->rnode),
! cdata, result) + 1;
/*
! * A right hand side insert can unbalance this node only to the right.
*/
if (AVL_BALANCE(*node) > 1)
***************
*** 231,236 ****
{
/*
! * RR situation, rebalance the tree by left rotating
! * this node.
*/
avl_rotate_left(node);
--- 229,234 ----
{
/*
! * RR situation, rebalance the tree by left rotating this
! * node.
*/
avl_rotate_left(node);
***************
*** 239,245 ****
{
/*
! * RL situation, rebalance the tree by first right
! * rotating the right hand side, then left rotating
! * this node.
*/
avl_rotate_right(&((*node)->rnode));
--- 237,242 ----
{
/*
! * RL situation, rebalance the tree by first right rotating
! * the right hand side, then left rotating this node.
*/
avl_rotate_right(&((*node)->rnode));
***************
*** 257,265 ****
if ((*node)->lnode == NULL)
{
! /*
! * Left side of current node is empty. Create a new node
! * there and return new maximum depth. Note that this can
! * only be 1 because otherwise this node would have been
! * unbalanced before.
*/
(*node)->lnode = *result = avl_makenode();
--- 254,261 ----
if ((*node)->lnode == NULL)
{
! /*
! * Left side of current node is empty. Create a new node there and
! * return new maximum depth. Note that this can only be 1 because
! * otherwise this node would have been unbalanced before.
*/
(*node)->lnode = *result = avl_makenode();
***************
*** 269,281 ****
/*
! * Left hand node exists. Recurse into that and remember the
! * new left hand side depth.
*/
! (*node)->ldepth = avl_insertinto(tree, &((*node)->lnode),
! cdata, result) + 1;
/*
! * A left hand side insert can unbalance this node only to the
! * left.
*/
if (AVL_BALANCE(*node) < -1)
--- 265,276 ----
/*
! * Left hand node exists. Recurse into that and remember the new left
! * hand side depth.
*/
! (*node)->ldepth = avl_insertinto(tree, &((*node)->lnode),
! cdata, result) + 1;
/*
! * A left hand side insert can unbalance this node only to the left.
*/
if (AVL_BALANCE(*node) < -1)
***************
*** 284,289 ****
{
/*
! * LL situation, rebalance the tree by right rotating
! * this node.
*/
avl_rotate_right(node);
--- 279,284 ----
{
/*
! * LL situation, rebalance the tree by right rotating this
! * node.
*/
avl_rotate_right(node);
***************
*** 292,297 ****
{
/*
! * LR situation, rebalance the tree by first left rotating
! * the left node, then right rotating this node.
*/
avl_rotate_left(&((*node)->lnode));
--- 287,292 ----
{
/*
! * LR situation, rebalance the tree by first left rotating the
! * left node, then right rotating this node.
*/
avl_rotate_left(&((*node)->lnode));
***************
*** 302,315 ****
return AVL_MAXDEPTH(*node);
}
! else {
/*
! * The new element is equal to this node. If it is marked
! * for deletion, free the user element data now. The caller
! * is supposed to replace it with a new element having the
! * the key.
*/
if ((*node)->deleted && tree->freefunc != NULL)
{
! (tree->freefunc)((*node)->cdata);
(*node)->cdata = NULL;
(*node)->deleted = 0;
--- 297,310 ----
return AVL_MAXDEPTH(*node);
}
! else
! {
/*
! * The new element is equal to this node. If it is marked for
! * deletion, free the user element data now. The caller is supposed to
! * replace it with a new element having the the key.
*/
if ((*node)->deleted && tree->freefunc != NULL)
{
! (tree->freefunc) ((*node)->cdata);
(*node)->cdata = NULL;
(*node)->deleted = 0;
***************
*** 327,336 ****
* ----
*/
! static AVLnode *
avl_makenode(void)
{
! AVLnode *new;
! new = (AVLnode *)malloc(sizeof(AVLnode));
memset(new, 0, sizeof(AVLnode));
--- 322,331 ----
* ----
*/
! static AVLnode *
avl_makenode(void)
{
! AVLnode *new;
! new = (AVLnode *) malloc(sizeof(AVLnode));
memset(new, 0, sizeof(AVLnode));
***************
*** 348,352 ****
avl_rotate_left(AVLnode **node)
{
! AVLnode *rtmp;
/*
--- 343,347 ----
avl_rotate_left(AVLnode **node)
{
! AVLnode *rtmp;
/*
***************
*** 386,390 ****
avl_rotate_right(AVLnode **node)
{
! AVLnode *ltmp;
/*
--- 381,385 ----
avl_rotate_right(AVLnode **node)
{
! AVLnode *ltmp;
/*
***************
*** 413,416 ****
*node = ltmp;
}
-
-
--- 408,409 ----
Index: avl_tree.h
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/misc/avl_tree.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** avl_tree.h 7 Jun 2007 13:01:10 -0000 1.1
--- avl_tree.h 23 Apr 2008 20:35:43 -0000 1.2
***************
*** 4,11 ****
* Declarations for AVL style balanced tree support.
*
! * Copyright (c) 2003-2007, PostgreSQL Global Development Group
! * Author: Jan Wieck, Afilias USA INC.
*
! * $Id$
* ----------------------------------------------------------------------
*/
--- 4,11 ----
* Declarations for AVL style balanced tree support.
*
! * Copyright (c) 2003-2007, PostgreSQL Global Development Group
! * Author: Jan Wieck, Afilias USA INC.
*
! * $Id$
* ----------------------------------------------------------------------
*/
***************
*** 18,22 ****
* ----
*/
! typedef int (AVLcompfunc) (void *, void *);
typedef void (AVLfreefunc) (void *);
--- 18,22 ----
* ----
*/
! typedef int (AVLcompfunc) (void *, void *);
typedef void (AVLfreefunc) (void *);
***************
*** 26,40 ****
* ----
*/
! typedef struct AVLnode_s {
! struct AVLnode_s *lnode, *rnode;
! int ldepth, rdepth;
! void *cdata;
! int deleted;
} AVLnode;
! typedef struct AVLtree_s {
! AVLnode *root;
! AVLcompfunc *compfunc;
! AVLfreefunc *freefunc;
} AVLtree;
--- 26,44 ----
* ----
*/
! typedef struct AVLnode_s
! {
! struct AVLnode_s *lnode,
! *rnode;
! int ldepth,
! rdepth;
! void *cdata;
! int deleted;
} AVLnode;
! typedef struct AVLtree_s
! {
! AVLnode *root;
! AVLcompfunc *compfunc;
! AVLfreefunc *freefunc;
} AVLtree;
***************
*** 45,49 ****
#define AVL_DATA(n) (n)->cdata
#define AVL_SETDATA(n,p) ((n)->cdata = (p))
! #define AVL_MAXDEPTH(n) (((n)->ldepth > (n)->rdepth) ? (n)->ldepth : (n)->rdepth)
#define AVL_BALANCE(n) ((n)->rdepth - (n)->ldepth)
--- 49,53 ----
#define AVL_DATA(n) (n)->cdata
#define AVL_SETDATA(n,p) ((n)->cdata = (p))
! #define AVL_MAXDEPTH(n) (((n)->ldepth > (n)->rdepth) ? (n)->ldepth : (n)->rdepth)
#define AVL_BALANCE(n) ((n)->rdepth - (n)->ldepth)
***************
*** 55,64 ****
* ----
*/
! void avl_init(AVLtree *tree, AVLcompfunc *compfunc,
! AVLfreefunc *freefunc);
void avl_reset(AVLtree *tree);
! AVLnode *avl_insert(AVLtree *tree, void *cdata);
! AVLnode *avl_lookup(AVLtree *tree, void *cdata);
int avl_delete(AVLtree *tree, void *cdata);
! #endif /* _AVL_TREE_H_INCLUDED_ */
--- 59,68 ----
* ----
*/
! void avl_init(AVLtree *tree, AVLcompfunc *compfunc,
! AVLfreefunc *freefunc);
void avl_reset(AVLtree *tree);
! AVLnode *avl_insert(AVLtree *tree, void *cdata);
! AVLnode *avl_lookup(AVLtree *tree, void *cdata);
int avl_delete(AVLtree *tree, void *cdata);
! #endif /* _AVL_TREE_H_INCLUDED_ */
From cbbrowne at lists.slony.info Wed Apr 23 13:35:46 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Wed Apr 23 13:35:49 2008
Subject: [Slony1-commit] slony1-engine/src/slon/port win32service.c
win32service.h
Message-ID: <20080423203546.1686229014F@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/src/slon/port
In directory main.slony.info:/tmp/cvs-serv2424/slon/port
Modified Files:
win32service.c win32service.h
Log Message:
Ran pgindent against C code
Index: win32service.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/port/win32service.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** win32service.c 19 Sep 2006 12:18:32 -0000 1.7
--- win32service.c 23 Apr 2008 20:35:44 -0000 1.8
***************
*** 2,11 ****
* win32service.c
*
! * Windows service integration and eventlog
*
* Copyright (c) 2005, PostgreSQL Global Development Group
* Author: Magnus Hagander
*
! * $Id$
*-------------------------------------------------------------------------
*/
[...1046 lines suppressed...]
strcpy(running_servicename, servicename);
***************
*** 638,645 ****
else if (r == 2)
{
! fprintf(stderr,"Engine '%s' not registered for service '%s'.\n", configfile, servicename);
}
else
! fprintf(stderr,"Failed to unregister engine: %lu\n", r);
exit(1);
}
--- 666,673 ----
else if (r == 2)
{
! fprintf(stderr, "Engine '%s' not registered for service '%s'.\n", configfile, servicename);
}
else
! fprintf(stderr, "Failed to unregister engine: %lu\n", r);
exit(1);
}
Index: win32service.h
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/port/win32service.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** win32service.h 6 Sep 2005 13:14:04 -0000 1.4
--- win32service.h 23 Apr 2008 20:35:44 -0000 1.5
***************
*** 2,15 ****
* win32service.h
*
! * Windows service definitions
*
* Copyright (c) 2005, PostgreSQL Global Development Group
*
! * $Id$
*-------------------------------------------------------------------------
*/
! void win32_servicestart(void);
! void win32_eventlog(int level, char *msg);
! extern int win32_isservice;
! void win32_serviceconfig(int argc, char *const argv[]);
--- 2,15 ----
* win32service.h
*
! * Windows service definitions
*
* Copyright (c) 2005, PostgreSQL Global Development Group
*
! * $Id$
*-------------------------------------------------------------------------
*/
! void win32_servicestart(void);
! void win32_eventlog(int level, char *msg);
! extern int win32_isservice;
! void win32_serviceconfig(int argc, char *const argv[]);
From cbbrowne at lists.slony.info Wed Apr 23 13:35:46 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Wed Apr 23 13:35:49 2008
Subject: [Slony1-commit] slony1-engine/src/slon cleanup_thread.c
confoptions.c confoptions.h dbutils.c remote_listen.c
remote_worker.c
Message-ID: <20080423203546.CBA3329014F@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/src/slon
In directory main.slony.info:/tmp/cvs-serv2424/slon
Modified Files:
cleanup_thread.c confoptions.c confoptions.h dbutils.c
remote_listen.c remote_worker.c
Log Message:
Ran pgindent against C code
Index: dbutils.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/dbutils.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** dbutils.c 27 Jun 2007 16:20:24 -0000 1.28
--- dbutils.c 23 Apr 2008 20:35:43 -0000 1.29
***************
*** 27,31 ****
! static int slon_appendquery_int(SlonDString * dsp, char *fmt, va_list ap);
static int db_get_version(PGconn *conn);
--- 27,31 ----
! static int slon_appendquery_int(SlonDString *dsp, char *fmt, va_list ap);
static int db_get_version(PGconn *conn);
***************
*** 45,49 ****
/* ----------
! * slon_connectdb
* ----------
*/
--- 45,49 ----
/* ----------
! * slon_connectdb
* ----------
*/
***************
*** 107,111 ****
}
PQclear(res);
!
/*
* Embed it into a SlonConn structure used to exchange it with the
--- 107,111 ----
}
PQclear(res);
!
/*
* Embed it into a SlonConn structure used to exchange it with the
***************
*** 115,140 ****
conn->dbconn = dbconn;
conn->pg_version = db_get_version(dbconn);
! if (conn->pg_version < 80300)
! {
! slon_log(SLON_ERROR,
! "slon_connectdb: PQconnectdb(\"%s\") PostgreSQL version not supported\n",
! conninfo);
! PQfinish(dbconn);
! return NULL;
! }
!
! slon_log(SLON_CONFIG,
! "version for \"%s\" is %d\n", conninfo, conn->pg_version);
if (conn->pg_version >= 80100)
! {
! slon_mkquery(&query, "set escape_string_warning to 'off'");
! res = PQexec(dbconn, dstring_data(&query));
! if (!(PQresultStatus(res) == PGRES_COMMAND_OK))
! {
! slon_log(SLON_ERROR, "Unable to set escape_string_warning to off\n");
! }
! PQclear(res);
! }
if (conn->pg_version >= 80200)
{
--- 115,140 ----
conn->dbconn = dbconn;
conn->pg_version = db_get_version(dbconn);
! if (conn->pg_version < 80300)
! {
! slon_log(SLON_ERROR,
! "slon_connectdb: PQconnectdb(\"%s\") PostgreSQL version not supported\n",
! conninfo);
! PQfinish(dbconn);
! return NULL;
! }
!
! slon_log(SLON_CONFIG,
! "version for \"%s\" is %d\n", conninfo, conn->pg_version);
if (conn->pg_version >= 80100)
! {
! slon_mkquery(&query, "set escape_string_warning to 'off'");
! res = PQexec(dbconn, dstring_data(&query));
! if (!(PQresultStatus(res) == PGRES_COMMAND_OK))
! {
! slon_log(SLON_ERROR, "Unable to set escape_string_warning to off\n");
! }
! PQclear(res);
! }
if (conn->pg_version >= 80200)
{
***************
*** 144,148 ****
{
slon_log(SLON_ERROR, "Unable to set the standard_conforming_strings to off\n");
! }
PQclear(res);
}
--- 144,148 ----
{
slon_log(SLON_ERROR, "Unable to set the standard_conforming_strings to off\n");
! }
PQclear(res);
}
***************
*** 153,161 ****
/* ----------
! * slon_disconnectdb
* ----------
*/
void
! slon_disconnectdb(SlonConn * conn)
{
/*
--- 153,161 ----
/* ----------
! * slon_disconnectdb
* ----------
*/
void
! slon_disconnectdb(SlonConn *conn)
{
/*
***************
*** 175,179 ****
/* ----------
! * slon_make_dummyconn
* ----------
*/
--- 175,179 ----
/* ----------
! * slon_make_dummyconn
* ----------
*/
***************
*** 207,215 ****
/* ----------
! * slon_free_dummyconn
* ----------
*/
void
! slon_free_dummyconn(SlonConn * conn)
{
/*
--- 207,215 ----
/* ----------
! * slon_free_dummyconn
* ----------
*/
void
! slon_free_dummyconn(SlonConn *conn)
{
/*
***************
*** 234,238 ****
* db_getLocalNodeId
*
! * Query a connection for the value of sequence sl_local_node_id
* ----------
*/
--- 234,238 ----
* db_getLocalNodeId
*
! * Query a connection for the value of sequence sl_local_node_id
* ----------
*/
***************
*** 380,391 ****
*
* A simple query formatting and quoting function using dynamic string buffer
! * allocation. Similar to sprintf() it uses formatting symbols:
! * %s String argument
! * %q Quoted literal (\ and ' will be escaped)
! * %d Integer argument
* ----------
*/
int
! slon_mkquery(SlonDString * dsp, char *fmt,...)
{
va_list ap;
--- 380,391 ----
*
* A simple query formatting and quoting function using dynamic string buffer
! * allocation. Similar to sprintf() it uses formatting symbols:
! * %s String argument
! * %q Quoted literal (\ and ' will be escaped)
! * %d Integer argument
* ----------
*/
int
! slon_mkquery(SlonDString *dsp, char *fmt,...)
{
va_list ap;
***************
*** 410,414 ****
*/
int
! slon_appendquery(SlonDString * dsp, char *fmt,...)
{
va_list ap;
--- 410,414 ----
*/
int
! slon_appendquery(SlonDString *dsp, char *fmt,...)
{
va_list ap;
***************
*** 427,435 ****
* slon_appendquery_int
*
! * Implementation of slon_mkquery() and slon_appendquery().
* ----------
*/
static int
! slon_appendquery_int(SlonDString * dsp, char *fmt, va_list ap)
{
char *s;
--- 427,435 ----
* slon_appendquery_int
*
! * Implementation of slon_mkquery() and slon_appendquery().
* ----------
*/
static int
! slon_appendquery_int(SlonDString *dsp, char *fmt, va_list ap)
{
char *s;
***************
*** 503,515 ****
}
! static int db_get_version(PGconn *conn)
{
! PGresult *res;
SlonDString query;
! char versionstr[7];
! int version=0;
! int major=0;
! int minor=0;
! int patch=0;
dstring_init(&query);
--- 503,516 ----
}
! static int
! db_get_version(PGconn *conn)
{
! PGresult *res;
SlonDString query;
! char versionstr[7];
! int version = 0;
! int major = 0;
! int minor = 0;
! int patch = 0;
dstring_init(&query);
***************
*** 517,522 ****
res = PQexec(conn, dstring_data(&query));
! if ( !res || PQresultStatus(res) != PGRES_TUPLES_OK )
! {
PQclear(res);
return -1;
--- 518,523 ----
res = PQexec(conn, dstring_data(&query));
! if (!res || PQresultStatus(res) != PGRES_TUPLES_OK)
! {
PQclear(res);
return -1;
***************
*** 529,537 ****
PQclear(res);
snprintf(versionstr, 7, "%.2d%.2d%.2d", major, minor, patch);
! version=atoi(versionstr);
dstring_free(&query);
return version;
}
!
/*
* Local Variables:
--- 530,538 ----
PQclear(res);
snprintf(versionstr, 7, "%.2d%.2d%.2d", major, minor, patch);
! version = atoi(versionstr);
dstring_free(&query);
return version;
}
!
/*
* Local Variables:
Index: remote_listen.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/remote_listen.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** remote_listen.c 6 Feb 2008 20:20:50 -0000 1.40
--- remote_listen.c 23 Apr 2008 20:35:43 -0000 1.41
***************
*** 1,3 ****
! /* ----------------------------------------------------------------------
* remote_listen.c
*
--- 1,3 ----
! * ----------------------------------------------------------------------
* remote_listen.c
*
***************
*** 698,702 ****
slon_appendquery(&query, ")");
}
! slon_appendquery(&query, " order by e.ev_origin, e.ev_seqno");
rtcfg_unlock();
--- 698,702 ----
slon_appendquery(&query, ")");
}
! slon_appendquery(&query, " order by e.ev_origin, e.ev_seqno limit 2000");
rtcfg_unlock();
Index: remote_worker.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/remote_worker.c,v
retrieving revision 1.166
retrieving revision 1.167
diff -C2 -d -r1.166 -r1.167
*** remote_worker.c 14 Feb 2008 22:21:42 -0000 1.166
--- remote_worker.c 23 Apr 2008 20:35:43 -0000 1.167
***************
*** 25,34 ****
#include "slon.h"
#include "../parsestatements/scanner.h"
! extern int STMTS[MAXSTATEMENTS];
! #define MAXGROUPSIZE 10000 /* What is the largest number of SYNCs we'd want to group together??? */
/* ----------
! * Local definitions
* ----------
*/
[...3530 lines suppressed...]
! slon_appendquery(&query1, "select 1 from %s.sl_subscribe WHERE sub_set=%d AND sub_receiver=%d for update"
! ,rtcfg_namespace, set_id, node_id);
! res = PQexec(local_dbconn, dstring_data(&query1));
! if (PQresultStatus(res) != PGRES_TUPLES_OK)
! {
! slon_log(SLON_ERROR, "remoteWorkerThread_%d: DDL preparation can not check set membership"
! ,node_id);
! dstring_free(&query1);
! slon_retry();
! }
dstring_free(&query1);
! if (PQntuples(res) == 0)
! {
! PQclear(res);
! return 0;
! }
! PQclear(res);
! return 1;
Index: confoptions.h
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/confoptions.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** confoptions.h 3 Jan 2008 15:47:21 -0000 1.37
--- confoptions.h 23 Apr 2008 20:35:43 -0000 1.38
***************
*** 8,12 ****
void *get_config_option(const char *name);
! void dump_configuration(void);
extern char *rtcfg_cluster_name;
--- 8,12 ----
void *get_config_option(const char *name);
! void dump_configuration(void);
extern char *rtcfg_cluster_name;
***************
*** 21,25 ****
extern int sync_max_rowsize;
extern int sync_max_largemem;
! extern int remote_listen_timeout;
extern int sync_group_maxsize;
--- 21,25 ----
extern int sync_max_rowsize;
extern int sync_max_largemem;
! extern int remote_listen_timeout;
extern int sync_group_maxsize;
***************
*** 49,53 ****
char *sql_on_connection;
char *lag_interval;
! char *command_on_logarchive;
enum config_type
--- 49,53 ----
char *sql_on_connection;
char *lag_interval;
! char *command_on_logarchive;
enum config_type
***************
*** 63,68 ****
/* constant fields, must be set correctly in initial value: */
const char *name;
! const char *short_desc;
! const char *long_desc;
enum config_type vartype; /* type of variable (set only at startup) */
};
--- 63,68 ----
/* constant fields, must be set correctly in initial value: */
const char *name;
! const char *short_desc;
! const char *long_desc;
enum config_type vartype; /* type of variable (set only at startup) */
};
***************
*** 106,110 ****
/* (all are constants) */
char **variable;
! const char *default_val;
};
--- 106,110 ----
/* (all are constants) */
char **variable;
! const char *default_val;
};
***************
*** 115,119 ****
static struct config_real ConfigureNamesReal[];
static struct config_string ConfigureNamesString[];
-
#endif
/*
--- 115,118 ----
Index: cleanup_thread.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/cleanup_thread.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** cleanup_thread.c 25 Feb 2008 15:43:38 -0000 1.43
--- cleanup_thread.c 23 Apr 2008 20:35:43 -0000 1.44
***************
*** 27,36 ****
/* ----------
! * Global data
* ----------
*/
int vac_frequency = SLON_VACUUM_FREQUENCY;
! char *cleanup_interval;
! bool cleanup_deletelogs;
static int vac_bias = 0;
--- 27,36 ----
/* ----------
! * Global data
* ----------
*/
int vac_frequency = SLON_VACUUM_FREQUENCY;
! char *cleanup_interval;
! bool cleanup_deletelogs;
static int vac_bias = 0;
***************
*** 42,50 ****
*
* Periodically calls the stored procedure to remove old events and log data and
! * vacuums those tables.
* ----------
*/
void *
! cleanupThread_main(/*@unused@*/ void *dummy)
{
SlonConn *conn;
--- 42,50 ----
*
* Periodically calls the stored procedure to remove old events and log data and
! * vacuums those tables.
* ----------
*/
void *
! cleanupThread_main( /* @unused@ */ void *dummy)
{
SlonConn *conn;
***************
*** 62,66 ****
int vac_enable = SLON_VACUUM_FREQUENCY;
char *vacuum_action;
! int ntuples;
slon_log(SLON_CONFIG, "cleanupThread: thread starts\n");
--- 62,66 ----
int vac_enable = SLON_VACUUM_FREQUENCY;
char *vacuum_action;
! int ntuples;
slon_log(SLON_CONFIG, "cleanupThread: thread starts\n");
***************
*** 82,86 ****
{
#ifndef WIN32
! (void) kill(getpid(), SIGTERM);
pthread_exit(NULL);
#else
--- 82,86 ----
{
#ifndef WIN32
! (void) kill(getpid(), SIGTERM);
pthread_exit(NULL);
#else
***************
*** 89,102 ****
/* slon_retry(); */
}
!
dbconn = conn->dbconn;
/*
* Build the query string for calling the cleanupEvent() stored procedure
*/
dstring_init(&query_baseclean);
! slon_mkquery(&query_baseclean, "select %s.cleanupEvent('%s'::interval, '%s'::boolean); ",
! rtcfg_namespace,
! cleanup_interval,
! cleanup_deletelogs ? "true" : "false"
);
dstring_init(&query2);
--- 89,103 ----
/* slon_retry(); */
}
!
dbconn = conn->dbconn;
+
/*
* Build the query string for calling the cleanupEvent() stored procedure
*/
dstring_init(&query_baseclean);
! slon_mkquery(&query_baseclean, "select %s.cleanupEvent('%s'::interval, '%s'::boolean); ",
! rtcfg_namespace,
! cleanup_interval,
! cleanup_deletelogs ? "true" : "false"
);
dstring_init(&query2);
***************
*** 121,125 ****
slon_log(SLON_FATAL,
"cleanupThread: \"%s\" - %s",
! dstring_data(&query_baseclean), PQresultErrorMessage(res));
PQclear(res);
slon_retry();
--- 122,126 ----
slon_log(SLON_FATAL,
"cleanupThread: \"%s\" - %s",
! dstring_data(&query_baseclean), PQresultErrorMessage(res));
PQclear(res);
slon_retry();
***************
*** 135,139 ****
* Detain the usual suspects (vacuum event and log data)
*/
! if (vac_frequency !=0)
{
vac_enable = vac_frequency;
--- 136,140 ----
* Detain the usual suspects (vacuum event and log data)
*/
! if (vac_frequency != 0)
{
vac_enable = vac_frequency;
***************
*** 147,154 ****
if (earliest_xid == latest_xid)
{
!
slon_log(SLON_INFO,
"cleanupThread: xid %d still active - analyze instead\n",
! earliest_xid);
}
else
--- 148,155 ----
if (earliest_xid == latest_xid)
{
!
slon_log(SLON_INFO,
"cleanupThread: xid %d still active - analyze instead\n",
! earliest_xid);
}
else
***************
*** 170,208 ****
res = PQexec(dbconn, dstring_data(&query2));
! /* for each table... and we should set up the
! * query to return not only the table name,
! * but also a boolean to support what's in the
! * SELECT below; that'll nicely simplify this
! * process... */
!
! if (PQresultStatus(res) != PGRES_TUPLES_OK) /* query error */
{
slon_log(SLON_ERROR,
! "cleanupThread: \"%s\" - %s",
! dstring_data(&query2), PQresultErrorMessage(res));
}
ntuples = PQntuples(res);
slon_log(SLON_DEBUG1, "cleanupThread: number of tables to clean: %d\n", ntuples);
! for (t = 0; t < ntuples ; t++)
{
! char *tab_nspname = PQgetvalue(res, t, 0);
! char *tab_relname = PQgetvalue(res, t, 1);
! slon_log (SLON_DEBUG1, "cleanupThread: %s analyze \"%s\".%s;\n",
! vacuum_action, tab_nspname, tab_relname);
dstring_init(&query_pertbl);
! slon_mkquery (&query_pertbl, "%s analyze \"%s\".%s;",
! vacuum_action, tab_nspname, tab_relname);
res2 = PQexec(dbconn, dstring_data(&query_pertbl));
! if (PQresultStatus(res) != PGRES_COMMAND_OK) /* query error */
! {
! slon_log(SLON_ERROR,
! "cleanupThread: \"%s\" - %s",
! dstring_data(&query_pertbl), PQresultErrorMessage(res2));
! /*
! * slon_retry(); break;
! */
! }
PQclear(res2);
dstring_reset(&query_pertbl);
--- 171,210 ----
res = PQexec(dbconn, dstring_data(&query2));
! /*
! * for each table... and we should set up the query to return not
! * only the table name, but also a boolean to support what's in
! * the SELECT below; that'll nicely simplify this process...
! */
!
! if (PQresultStatus(res) != PGRES_TUPLES_OK) /* query error */
{
slon_log(SLON_ERROR,
! "cleanupThread: \"%s\" - %s",
! dstring_data(&query2), PQresultErrorMessage(res));
}
ntuples = PQntuples(res);
slon_log(SLON_DEBUG1, "cleanupThread: number of tables to clean: %d\n", ntuples);
! for (t = 0; t < ntuples; t++)
{
! char *tab_nspname = PQgetvalue(res, t, 0);
! char *tab_relname = PQgetvalue(res, t, 1);
! slon_log(SLON_DEBUG1, "cleanupThread: %s analyze \"%s\".%s;\n",
! vacuum_action, tab_nspname, tab_relname);
dstring_init(&query_pertbl);
! slon_mkquery(&query_pertbl, "%s analyze \"%s\".%s;",
! vacuum_action, tab_nspname, tab_relname);
res2 = PQexec(dbconn, dstring_data(&query_pertbl));
! if (PQresultStatus(res) != PGRES_COMMAND_OK) /* query error */
! {
! slon_log(SLON_ERROR,
! "cleanupThread: \"%s\" - %s",
! dstring_data(&query_pertbl), PQresultErrorMessage(res2));
!
! /*
! * slon_retry(); break;
! */
! }
PQclear(res2);
dstring_reset(&query_pertbl);
***************
*** 272,277 ****
PQclear(res);
dstring_free(&query);
! return (unsigned long)xid;
}
-
-
--- 274,277 ----
PQclear(res);
dstring_free(&query);
! return (unsigned long) xid;
}
Index: confoptions.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/confoptions.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** confoptions.c 14 Feb 2008 22:19:16 -0000 1.28
--- confoptions.c 23 Apr 2008 20:35:43 -0000 1.29
***************
*** 4,9 ****
#include "slon.h"
! #ifdef qsort
! #undef qsort
#endif
--- 4,9 ----
#include "slon.h"
! #ifdef qsort
! #undef qsort
#endif
***************
*** 18,47 ****
void *get_config_option(const char *name);
! static bool bool_placeholder;
! static double real_placeholder;
! static char *string_placeholder;
! void dump_configuration(void);
! void dump_configuration(void)
{
! int i;
! for (i = 0; ConfigureNamesInt[i].gen.name; i++) {
slon_log(SLON_CONFIG, "main: Integer option %s = %d\n",
! ConfigureNamesInt[i].gen.name, *(ConfigureNamesInt[i].variable));
}
! for (i = 0; ConfigureNamesBool[i].gen.name; i++) {
slon_log(SLON_CONFIG, "main: Boolean option %s = %d\n",
! ConfigureNamesBool[i].gen.name, *(ConfigureNamesBool[i].variable));
}
! for (i = 0; ConfigureNamesReal[i].gen.name; i++) {
slon_log(SLON_CONFIG, "main: Real option %s = %f\n",
! ConfigureNamesReal[i].gen.name, *(ConfigureNamesReal[i].variable));
}
! for (i = 0; ConfigureNamesString[i].gen.name; i++) {
slon_log(SLON_CONFIG, "main: String option %s = %s\n",
! ConfigureNamesString[i].gen.name, *(ConfigureNamesString[i].variable));
}
!
}
--- 18,53 ----
void *get_config_option(const char *name);
! static bool bool_placeholder;
! static double real_placeholder;
! static char *string_placeholder;
! void dump_configuration(void);
! void
! dump_configuration(void)
{
! int i;
!
! for (i = 0; ConfigureNamesInt[i].gen.name; i++)
! {
slon_log(SLON_CONFIG, "main: Integer option %s = %d\n",
! ConfigureNamesInt[i].gen.name, *(ConfigureNamesInt[i].variable));
}
! for (i = 0; ConfigureNamesBool[i].gen.name; i++)
! {
slon_log(SLON_CONFIG, "main: Boolean option %s = %d\n",
! ConfigureNamesBool[i].gen.name, *(ConfigureNamesBool[i].variable));
}
! for (i = 0; ConfigureNamesReal[i].gen.name; i++)
! {
slon_log(SLON_CONFIG, "main: Real option %s = %f\n",
! ConfigureNamesReal[i].gen.name, *(ConfigureNamesReal[i].variable));
}
! for (i = 0; ConfigureNamesString[i].gen.name; i++)
! {
slon_log(SLON_CONFIG, "main: String option %s = %s\n",
! ConfigureNamesString[i].gen.name, *(ConfigureNamesString[i].variable));
}
!
}
***************
*** 125,129 ****
num_conf_variables = num_vars;
size_conf_variables = size_vars;
! qsort((void *)conf_variables, (size_t) num_conf_variables, sizeof(struct config_generic *), conf_var_compare);
}
--- 131,135 ----
num_conf_variables = num_vars;
size_conf_variables = size_vars;
! qsort((void *) conf_variables, (size_t) num_conf_variables, sizeof(struct config_generic *), conf_var_compare);
}
***************
*** 131,135 ****
#ifdef NEED_ADD_CONF_VARIABLE
static bool
! add_conf_variable(struct config_generic * var, int elevel)
{
if (num_conf_variables + 1 >= size_conf_variables)
--- 137,141 ----
#ifdef NEED_ADD_CONF_VARIABLE
static bool
! add_conf_variable(struct config_generic *var, int elevel)
{
if (num_conf_variables + 1 >= size_conf_variables)
***************
*** 162,166 ****
}
conf_variables[num_conf_variables++] = var;
! qsort((void *)conf_variables, num_conf_variables,
sizeof(struct config_generic *), conf_var_compare);
return true;
--- 168,172 ----
}
conf_variables[num_conf_variables++] = var;
! qsort((void *) conf_variables, num_conf_variables,
sizeof(struct config_generic *), conf_var_compare);
return true;
***************
*** 227,233 ****
static bool
! parse_bool(const char *value, bool * result)
{
! int len = (int) strlen(value);
if (strncasecmp(value, "true", len) == 0)
--- 233,239 ----
static bool
! parse_bool(const char *value, bool *result)
{
! int len = (int) strlen(value);
if (strncasecmp(value, "true", len) == 0)
***************
*** 311,320 ****
#ifdef HAVE_LONG_INT_64
/* if long > 32 bits, check for overflow of int4 */
! || val != (long)((int32) val)
#endif
)
return false;
if (result)
! *result = (int)val;
return true;
}
--- 317,326 ----
#ifdef HAVE_LONG_INT_64
/* if long > 32 bits, check for overflow of int4 */
! || val != (long) ((int32) val)
#endif
)
return false;
if (result)
! *result = (int) val;
return true;
}
***************
*** 348,353 ****
res = (struct config_generic **)
! bsearch((void *)&key,
! (void *)conf_variables,
(size_t) num_conf_variables,
sizeof(struct config_generic *),
--- 354,359 ----
res = (struct config_generic **)
! bsearch((void *) &key,
! (void *) conf_variables,
(size_t) num_conf_variables,
sizeof(struct config_generic *),
***************
*** 417,421 ****
struct config_bool *conf = (struct config_bool *) record;
! return (void *)conf->variable;
/* break; */
}
--- 423,427 ----
struct config_bool *conf = (struct config_bool *) record;
! return (void *) conf->variable;
/* break; */
}
***************
*** 424,428 ****
struct config_int *conf = (struct config_int *) record;
! return (void *)conf->variable;
/* break; */
}
--- 430,434 ----
struct config_int *conf = (struct config_int *) record;
! return (void *) conf->variable;
/* break; */
}
***************
*** 431,435 ****
struct config_real *conf = (struct config_real *) record;
! return (void *)conf->variable;
/* break; */
}
--- 437,441 ----
struct config_real *conf = (struct config_real *) record;
! return (void *) conf->variable;
/* break; */
}
***************
*** 438,442 ****
struct config_string *conf = (struct config_string *) record;
! return (void *)*conf->variable;
/* break; */
}
--- 444,448 ----
struct config_string *conf = (struct config_string *) record;
! return (void *) *conf->variable;
/* break; */
}
***************
*** 485,489 ****
{
struct config_int *conf = (struct config_int *) record;
! int newval=0;
if (value)
--- 491,495 ----
{
struct config_int *conf = (struct config_int *) record;
! int newval = 0;
if (value)
***************
*** 565,569 ****
{
{
! (const char *)"vac_frequency", /* conf name */
gettext_noop("Sets how many cleanup cycles to run before a vacuum is done"), /* short desc */
gettext_noop("Sets how many cleanup cycles to run before a vacuum is done"), /* long desc */
--- 571,575 ----
{
{
! (const char *) "vac_frequency", /* conf name */
gettext_noop("Sets how many cleanup cycles to run before a vacuum is done"), /* short desc */
gettext_noop("Sets how many cleanup cycles to run before a vacuum is done"), /* long desc */
***************
*** 577,581 ****
{
{
! (const char *)"log_level",
gettext_noop("debug log level"),
gettext_noop("debug log level"),
--- 583,587 ----
{
{
! (const char *) "log_level",
gettext_noop("debug log level"),
gettext_noop("debug log level"),
***************
*** 589,593 ****
{
{
! (const char *)"sync_interval",
gettext_noop("sync event interval"),
gettext_noop("sync event interval in ms"),
--- 595,599 ----
{
{
! (const char *) "sync_interval",
gettext_noop("sync event interval"),
gettext_noop("sync event interval in ms"),
***************
*** 601,605 ****
{
{
! (const char *)"sync_interval_timeout",
gettext_noop("sync interval time out"),
gettext_noop("sync interval time out"),
--- 607,611 ----
{
{
! (const char *) "sync_interval_timeout",
gettext_noop("sync interval time out"),
gettext_noop("sync interval time out"),
***************
*** 613,617 ****
{
{
! (const char *)"sync_group_maxsize",
gettext_noop("sync group"),
gettext_noop("sync group"),
--- 619,623 ----
{
{
! (const char *) "sync_group_maxsize",
gettext_noop("sync group"),
gettext_noop("sync group"),
***************
*** 625,629 ****
{
{
! (const char *)"desired_sync_time",
gettext_noop("maximum time planned for grouped SYNCs"),
gettext_noop("If replication is behind, slon will try to increase numbers of "
--- 631,635 ----
{
{
! (const char *) "desired_sync_time",
gettext_noop("maximum time planned for grouped SYNCs"),
gettext_noop("If replication is behind, slon will try to increase numbers of "
***************
*** 640,644 ****
{
{
! (const char *)"syslog",
gettext_noop("Uses syslog for logging."),
gettext_noop("If this parameter is 1, messages go both to syslog "
--- 646,650 ----
{
{
! (const char *) "syslog",
gettext_noop("Uses syslog for logging."),
gettext_noop("If this parameter is 1, messages go both to syslog "
***************
*** 656,660 ****
{
{
! (const char *)"quit_sync_provider",
gettext_noop("Node to watch for a final SYNC"),
gettext_noop("We want to terminate slon when the worker thread reaches a certain SYNC number "
--- 662,666 ----
{
{
! (const char *) "quit_sync_provider",
gettext_noop("Node to watch for a final SYNC"),
gettext_noop("We want to terminate slon when the worker thread reaches a certain SYNC number "
***************
*** 669,673 ****
{
{
! (const char *)"quit_sync_finalsync",
gettext_noop("SYNC number at which slon should abort"),
gettext_noop("We want to terminate slon when the worker thread reaches a certain SYNC number "
--- 675,679 ----
{
{
! (const char *) "quit_sync_finalsync",
gettext_noop("SYNC number at which slon should abort"),
gettext_noop("We want to terminate slon when the worker thread reaches a certain SYNC number "
***************
*** 682,718 ****
{
{
! (const char *)"sync_max_rowsize", /* conf name */
! gettext_noop("sl_log_? rows larger than that are read separately"), /* short desc */
! gettext_noop("sl_log_? rows larger than that are read separately"), /* long desc */
SLON_C_INT /* config type */
},
! &sync_max_rowsize, /* var name */
! 8192, /* default val */
! 1024, /* min val */
! 32768 /* max val */
},
{
{
! (const char *)"sync_max_largemem", /* conf name */
gettext_noop("How much memory to allow for sl_log_? rows exceeding sync_max_rowsize"), /* short desc */
gettext_noop("How much memory to allow for sl_log_? rows exceeding sync_max_rowsize"), /* long desc */
SLON_C_INT /* config type */
},
! &sync_max_largemem, /* var name */
! 5242880, /* default val */
! 1048576, /* min val */
! 1073741824 /* max val */
},
{
{
! (const char *)"remote_listen_timeout", /* conf name */
gettext_noop("How long to wait, in seconds, before timeout when querying for remote events"), /* short desc */
gettext_noop("How long to wait, in seconds, before timeout when querying for remote events"), /* long desc */
SLON_C_INT /* config type */
},
! &remote_listen_timeout, /* var name */
300, /* default val */
! 30, /* min val */
30000 /* max val */
},
--- 688,724 ----
{
{
! (const char *) "sync_max_rowsize", /* conf name */
! gettext_noop("sl_log_? rows larger than that are read separately"), /* short desc */
! gettext_noop("sl_log_? rows larger than that are read separately"), /* long desc */
SLON_C_INT /* config type */
},
! &sync_max_rowsize, /* var name */
! 8192, /* default val */
! 1024, /* min val */
! 32768 /* max val */
},
{
{
! (const char *) "sync_max_largemem", /* conf name */
gettext_noop("How much memory to allow for sl_log_? rows exceeding sync_max_rowsize"), /* short desc */
gettext_noop("How much memory to allow for sl_log_? rows exceeding sync_max_rowsize"), /* long desc */
SLON_C_INT /* config type */
},
! &sync_max_largemem, /* var name */
! 5242880, /* default val */
! 1048576, /* min val */
! 1073741824 /* max val */
},
{
{
! (const char *) "remote_listen_timeout", /* conf name */
gettext_noop("How long to wait, in seconds, before timeout when querying for remote events"), /* short desc */
gettext_noop("How long to wait, in seconds, before timeout when querying for remote events"), /* long desc */
SLON_C_INT /* config type */
},
! &remote_listen_timeout, /* var name */
300, /* default val */
! 30, /* min val */
30000 /* max val */
},
***************
*** 726,732 ****
{
{
! (const char *)"log_pid", /* conf name */
! gettext_noop("Should logs include PID?"), /* short desc */
! gettext_noop("Should logs include PID?"), /* long desc */
SLON_C_BOOL /* config type */
},
--- 732,738 ----
{
{
! (const char *) "log_pid", /* conf name */
! gettext_noop("Should logs include PID?"), /* short desc */
! gettext_noop("Should logs include PID?"), /* long desc */
SLON_C_BOOL /* config type */
},
***************
*** 736,740 ****
{
{
! (const char *)"log_timestamp",
gettext_noop("Should logs include timestamp?"),
gettext_noop("Should logs include timestamp?"),
--- 742,746 ----
{
{
! (const char *) "log_timestamp",
gettext_noop("Should logs include timestamp?"),
gettext_noop("Should logs include timestamp?"),
***************
*** 747,751 ****
{
{
! (const char *)"cleanup_deletelogs",
gettext_noop("Should the cleanup thread DELETE sl_log_? entries or not"),
gettext_noop("Should the cleanup thread DELETE sl_log_? entries or not"),
--- 753,757 ----
{
{
! (const char *) "cleanup_deletelogs",
gettext_noop("Should the cleanup thread DELETE sl_log_? entries or not"),
gettext_noop("Should the cleanup thread DELETE sl_log_? entries or not"),
***************
*** 763,767 ****
{
{
! (const char *)"real_placeholder", /* conf name */
gettext_noop("place holder"), /* short desc */
gettext_noop("place holder"), /* long desc */
--- 769,773 ----
{
{
! (const char *) "real_placeholder", /* conf name */
gettext_noop("place holder"), /* short desc */
gettext_noop("place holder"), /* long desc */
***************
*** 780,784 ****
{
{
! (const char *)"cluster_name", /* conf name */
gettext_noop("Name of the replication cluster"), /* short desc */
NULL, /* long desc */
--- 786,790 ----
{
{
! (const char *) "cluster_name", /* conf name */
gettext_noop("Name of the replication cluster"), /* short desc */
NULL, /* long desc */
***************
*** 790,794 ****
{
{
! (const char *)"conn_info",
gettext_noop("connection info string"),
NULL,
--- 796,800 ----
{
{
! (const char *) "conn_info",
gettext_noop("connection info string"),
NULL,
***************
*** 800,804 ****
{
{
! (const char *)"pid_file",
gettext_noop("Where to write the pid file"),
NULL,
--- 806,810 ----
{
{
! (const char *) "pid_file",
gettext_noop("Where to write the pid file"),
NULL,
***************
*** 810,814 ****
{
{
! (const char *)"log_timestamp_format",
gettext_noop("A strftime()-style log timestamp format string."),
NULL,
--- 816,820 ----
{
{
! (const char *) "log_timestamp_format",
gettext_noop("A strftime()-style log timestamp format string."),
NULL,
***************
*** 820,824 ****
{
{
! (const char *)"archive_dir",
gettext_noop("Where to drop the sync archive files"),
NULL,
--- 826,830 ----
{
{
! (const char *) "archive_dir",
gettext_noop("Where to drop the sync archive files"),
NULL,
***************
*** 830,834 ****
{
{
! (const char *)"sql_on_connection",
gettext_noop("SQL to send to each connected node upon "
"connection establishment, useful to enable "
--- 836,840 ----
{
{
! (const char *) "sql_on_connection",
gettext_noop("SQL to send to each connected node upon "
"connection establishment, useful to enable "
***************
*** 845,849 ****
{
{
! (const char *)"lag_interval",
gettext_noop("A PostgreSQL value compatible with ::interval "
"which indicates how far behind this node should "
--- 851,855 ----
{
{
! (const char *) "lag_interval",
gettext_noop("A PostgreSQL value compatible with ::interval "
"which indicates how far behind this node should "
***************
*** 858,867 ****
{
{
! (const char *)"command_on_logarchive",
gettext_noop("Command to run (probably a shell script) "
! "every time a log archive is committed. "
! "This command will be passed one parameter: "
! "The full pathname of the archive file"
! ),
NULL,
SLON_C_STRING
--- 864,873 ----
{
{
! (const char *) "command_on_logarchive",
gettext_noop("Command to run (probably a shell script) "
! "every time a log archive is committed. "
! "This command will be passed one parameter: "
! "The full pathname of the archive file"
! ),
NULL,
SLON_C_STRING
***************
*** 875,879 ****
{
{
! (const char *)"syslog_facility",
gettext_noop("Sets the syslog \"facility\" to be used when syslog enabled."),
gettext_noop("Valid values are LOCAL0, LOCAL1, LOCAL2, LOCAL3, "
--- 881,885 ----
{
{
! (const char *) "syslog_facility",
gettext_noop("Sets the syslog \"facility\" to be used when syslog enabled."),
gettext_noop("Valid values are LOCAL0, LOCAL1, LOCAL2, LOCAL3, "
***************
*** 886,890 ****
{
{
! (const char *)"syslog_ident",
gettext_noop("Sets the program name used to identify slon messages in syslog."),
NULL,
--- 892,896 ----
{
{
! (const char *) "syslog_ident",
gettext_noop("Sets the program name used to identify slon messages in syslog."),
NULL,
***************
*** 897,901 ****
{
{
! (const char *)"cleanup_interval",
gettext_noop("A PostgreSQL value compatible with ::interval "
"which indicates what aging interval should be used "
--- 903,907 ----
{
{
! (const char *) "cleanup_interval",
gettext_noop("A PostgreSQL value compatible with ::interval "
"which indicates what aging interval should be used "
***************
*** 912,919 ****
/*
* Local Variables:
! * tab-width: 4
! * c-indent-level: 4
! * c-basic-offset: 4
* End:
*/
-
--- 918,924 ----
/*
* Local Variables:
! * tab-width: 4
! * c-indent-level: 4
! * c-basic-offset: 4
* End:
*/
From cbbrowne at lists.slony.info Wed Apr 23 13:37:08 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Wed Apr 23 13:37:09 2008
Subject: [Slony1-commit] slony1-engine/src/slon remote_listen.c
Message-ID: <20080423203708.B00AB29012D@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/src/slon
In directory main.slony.info:/tmp/cvs-serv2512/slon
Modified Files:
remote_listen.c
Log Message:
EEP! A change I described in an email got included into the
pgindent commit!
Rolling that back...
Index: remote_listen.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/remote_listen.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** remote_listen.c 23 Apr 2008 20:35:43 -0000 1.41
--- remote_listen.c 23 Apr 2008 20:37:06 -0000 1.42
***************
*** 698,702 ****
slon_appendquery(&query, ")");
}
! slon_appendquery(&query, " order by e.ev_origin, e.ev_seqno limit 2000");
rtcfg_unlock();
--- 698,702 ----
slon_appendquery(&query, ")");
}
! slon_appendquery(&query, " order by e.ev_origin, e.ev_seqno");
rtcfg_unlock();
From cbbrowne at lists.slony.info Wed Apr 23 15:29:14 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Wed Apr 23 15:29:15 2008
Subject: [Slony1-commit] slony1-engine/src/slon remote_listen.c
Message-ID: <20080423222914.2F01629014F@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/src/slon
In directory main.slony.info:/tmp/cvs-serv10799
Modified Files:
remote_listen.c
Log Message:
Fix typo in remote_listen.c - cbbrowne "fatfingered"
Index: remote_listen.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/remote_listen.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** remote_listen.c 23 Apr 2008 20:37:06 -0000 1.42
--- remote_listen.c 23 Apr 2008 22:29:12 -0000 1.43
***************
*** 1,3 ****
! * ----------------------------------------------------------------------
* remote_listen.c
*
--- 1,3 ----
! /* ----------------------------------------------------------------------
* remote_listen.c
*
From cbbrowne at lists.slony.info Thu Apr 24 08:10:28 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Thu Apr 24 08:10:29 2008
Subject: [Slony1-commit] slony1-engine/tools configure-replication.txt
Message-ID: <20080424151028.75F692900F6@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/tools
In directory main.slony.info:/tmp/cvs-serv527
Modified Files:
configure-replication.txt
Log Message:
Fix typo as pointed out by Jeff Frost
Index: configure-replication.txt
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/tools/configure-replication.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** configure-replication.txt 22 Nov 2007 17:47:03 -0000 1.2
--- configure-replication.txt 24 Apr 2008 15:10:26 -0000 1.3
***************
*** 67,71 ****
cluster.
! 2. create_set.slonik
This is the first script to run; it sets up the requested nodes as
--- 67,71 ----
cluster.
! 2. create_nodes.slonik
This is the first script to run; it sets up the requested nodes as
From cbbrowne at lists.slony.info Thu Apr 24 08:11:16 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Thu Apr 24 08:11:18 2008
Subject: [Slony1-commit] slony1-engine/tools configure-replication.sh
Message-ID: <20080424151116.AD2CD2900F6@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/tools
In directory main.slony.info:/tmp/cvs-serv895
Modified Files:
configure-replication.sh
Log Message:
Change configure-replication.sh to use EVENT NODE in various places where
it has become mandatory
Index: configure-replication.sh
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/tools/configure-replication.sh,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** configure-replication.sh 22 Nov 2007 17:47:03 -0000 1.4
--- configure-replication.sh 24 Apr 2008 15:11:14 -0000 1.5
***************
*** 7,10 ****
--- 7,11 ----
# Defaults - origin node
+ ORIGIN=1
DB1=${DB1:-${PGDATABASE:-"slonytest"}}
HOST1=${HOST1:-`hostname`}
***************
*** 146,150 ****
for table in `echo $TABLES`; do
! echo "set add table (id=${tnum}, set id=1, origin=1, fully qualified name='${table}', comment='${CLUSTER} table ${table}');" >> $SETUPSET
tnum=`expr ${tnum} + 1`
done
--- 147,151 ----
for table in `echo $TABLES`; do
! echo "set add table (id=${tnum}, set id=1, origin=${ORIGIN}, fully qualified name='${table}', comment='${CLUSTER} table ${table}');" >> $SETUPSET
tnum=`expr ${tnum} + 1`
done
***************
*** 152,156 ****
snum=1
for seq in `echo $SEQUENCES`; do
! echo "set add sequence (id=${snum}, set id=1, origin=1, fully qualified name='${seq}', comment='${CLUSTER} sequence ${seq}');" >> $SETUPSET
snum=`expr ${snum} + 1`
done
--- 153,157 ----
snum=1
for seq in `echo $SEQUENCES`; do
! echo "set add sequence (id=${snum}, set id=1, origin=${ORIGIN}, fully qualified name='${seq}', comment='${CLUSTER} sequence ${seq}');" >> $SETUPSET
snum=`expr ${snum} + 1`
done
***************
*** 164,168 ****
SUBFILE=$mktmp/subscribe_set_${node}.slonik
echo "include <${PREAMBLE}>;" > $SUBFILE
! echo "store node (id=${node}, comment='${CLUSTER} subscriber node ${node}');" >> $NODEINIT
echo "subscribe set (id=1, provider=1, receiver=${node}, forward=yes);" >> $SUBFILE
if [ ${node} -ge ${NUMNODES} ]; then
--- 165,169 ----
SUBFILE=$mktmp/subscribe_set_${node}.slonik
echo "include <${PREAMBLE}>;" > $SUBFILE
! echo "store node (id=${node}, comment='${CLUSTER} subscriber node ${node}', event node=${ORIGIN});" >> $NODEINIT
echo "subscribe set (id=1, provider=1, receiver=${node}, forward=yes);" >> $SUBFILE
if [ ${node} -ge ${NUMNODES} ]; then
From cbbrowne at lists.slony.info Thu Apr 24 08:11:48 2008
From: cbbrowne at lists.slony.info (Chris Browne)
Date: Thu Apr 24 08:11:50 2008
Subject: [Slony1-commit] slony1-engine/tools configure-replication.txt
Message-ID: <20080424151148.F3EC3290139@main.slony.info>
Update of /home/cvsd/slony1/slony1-engine/tools
In directory main.slony.info:/tmp/cvs-serv926
Modified Files:
Tag: REL_1_2_STABLE
configure-replication.txt
Log Message:
Fix typo as pointed out by Jeff Frost
Index: configure-replication.txt
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/tools/configure-replication.txt,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** configure-replication.txt 7 Nov 2006 16:02:17 -0000 1.1.2.1
--- configure-replication.txt 24 Apr 2008 15:11:46 -0000 1.1.2.2
***************
*** 62,66 ****
cluster.
! 2. create_set.slonik
This is the first script to run; it sets up the requested nodes as
--- 62,66 ----
cluster.
! 2. create_nodes.slonik
This is the first script to run; it sets up the requested nodes as