exec 3>$of
+echo >&3 '\set ON_ERROR_STOP 1'
+
echo >&3 "BEGIN;"
-for t in flights flights_harness_touched jobs runvars steps;
+tables='flights flights_harness_touched jobs runvars steps'
+
+df=cam101-history-deletes
+exec 4>$df
+for t in $tables
do
- echo >&3 "DELETE FROM $t WHERE flight < 50000;"
+ echo >&4 "DELETE FROM $t WHERE flight < 50000;"
+done
+tac $df >&3
+for t in $tables;
+do
tf=cam101-history-$t.tmp
pg_dump \
-a -b -F plain -O \
--table=$t \
--no-security-labels \
--no-tablespaces \
+ --serializable-deferrable \
-f $tf -h osstestdb.db.cam.xci-test.com osstestdb
sed -e 's/^SELECT pg_catalog\.setval/-- &/g' <$tf >&3
done