Fri Apr 20 14:43:16 PDT 2007
- Previous message: [Slony1-commit] slony1-engine/tests run_test.sh settings.ik
- Next message: [Slony1-commit] slony1-engine/doc/adminguide slonik_ref.sgml
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /home/cvsd/slony1/slony1-engine/tests/testlogship
In directory main.slony.info:/tmp/cvs-serv4869/testlogship
Modified Files:
README generate_dml.sh schema.diff
Added Files:
ddl_updates.sql exec_ddl.sh
Log Message:
Log shipping test added to HEAD which tweaks a problem found in 1.2
where DDL statements (and other non-SYNC events) are not loaded
properly on a log shipped node.
Index: generate_dml.sh
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/tests/testlogship/generate_dml.sh,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** generate_dml.sh 20 Apr 2007 20:54:55 -0000 1.2
--- generate_dml.sh 20 Apr 2007 21:43:14 -0000 1.3
***************
*** 65,68 ****
--- 65,69 ----
{
originnode=${ORIGINNODE:-"1"}
+ SCRIPT=${mktmp}/slonik.script
eval db=\$DB${originnode}
eval host=\$HOST${originnode}
***************
*** 96,100 ****
if [ $? -ne 0 ]; then
warn 3 "loading data failed, see $mktmp/moredata.log for details"
! fi
wait_for_catchup
status "second data load complete - now load files into log shipped node"
--- 97,115 ----
if [ $? -ne 0 ]; then
warn 3 "loading data failed, see $mktmp/moredata.log for details"
! fi
! wait_for_catchup
!
! status "execute DDL script"
! init_preamble
! sh ${testname}/exec_ddl.sh ${testname} >> $SCRIPT
! do_ik
! status "completed DDL script"
!
! status "Generate some more data"
! generate_initdata
! eval db=\$DB${originnode}
! status "loading extra data to node $db"
! $pgbindir/psql -h $host -p $port -U $user -d $db < $mktmp/generate.data 1> ${mktmp}/even_more_data.log 2> ${mktmp}/even_more_data.log2
!
wait_for_catchup
status "second data load complete - now load files into log shipped node"
--- NEW FILE: ddl_updates.sql ---
alter table table4 add column newcol timestamptz;
alter table table4 alter column newcol set default now();
alter table table4 add column newint integer;
update table4 set newint = 42;
Index: schema.diff
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/tests/testlogship/schema.diff,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** schema.diff 20 Apr 2007 20:54:55 -0000 1.2
--- schema.diff 20 Apr 2007 21:43:14 -0000 1.3
***************
*** 1,3 ****
SELECT id,data FROM table1 ORDER BY id
SELECT id,table1_id,data FROM table2 ORDER BY id
! SELECT id,numcol,realcol,ptcol,pathcol,polycol,circcol,ipcol,maccol, bitcol from table4 order by id;
--- 1,3 ----
SELECT id,data FROM table1 ORDER BY id
SELECT id,table1_id,data FROM table2 ORDER BY id
! SELECT id,numcol,realcol,ptcol,pathcol,polycol,circcol,ipcol,maccol, bitcol, newcol, newint from table4 order by id;
Index: README
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/tests/testlogship/README,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** README 20 Apr 2007 20:54:55 -0000 1.2
--- README 20 Apr 2007 21:43:14 -0000 1.3
***************
*** 19,23 ****
It also creates...
! 3. table3 which has columns of all sorts of vaguely esoteric types to
exercise that points, paths, bitmaps, mac addresses, and inet types
replicate properly.
--- 19,30 ----
It also creates...
! 3. table4 which has columns of all sorts of vaguely esoteric types to
exercise that points, paths, bitmaps, mac addresses, and inet types
replicate properly.
+
+ It then loads data into these tables.
+
+ The test proceeds to run a DDL script which alters the schema for
+ table 4, adding two new columns, one to be populated via a default,
+ for new tuples; the other has no default, but we assign the value 42
+ to all tuples existing at the time that the DDL script runs.
\ No newline at end of file
--- NEW FILE: exec_ddl.sh ---
testname=$1
echo "
EXECUTE SCRIPT (
SET ID = 1,
FILENAME = '${testname}/ddl_updates.sql',
EVENT NODE = 1
);
"
- Previous message: [Slony1-commit] slony1-engine/tests run_test.sh settings.ik
- Next message: [Slony1-commit] slony1-engine/doc/adminguide slonik_ref.sgml
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list