Dump template db in dumpall
#define K_VERS_MAJOR 1
#define K_VERS_MINOR 4
-#define K_VERS_REV 20
+#define K_VERS_REV 21
/* Data block types */
#define BLK_DATA 1
lclContext* ctx = (lclContext*)AH->formatData;
TAR_MEMBER *th;
RestoreOptions *ropt;
- int savVerbose;
+ int savVerbose, i;
if (AH->mode == archModeWrite) {
AH->public.verbose = savVerbose;
tarClose(AH, th);
+
+ /* Add a block of NULLs since it's de-rigeur. */
+ for(i=0; i<512; i++)
+ {
+ fputc(0, ctx->tarFH);
+ }
+
}
AH->FH = NULL;
done
+# First we dump the template in case there are local extensions.
+
+echo
+echo "--"
+echo "-- Database template1"
+echo "--"
+echo "${BS}connect template1"
+$PGDUMP "template1"
+if [ "$?" -ne 0 ] ; then
+ echo "pg_dump failed on template1, exiting" 1>&2
+ exit 1
+fi
+
+
# For each database, run pg_dump to dump the contents of that database.
$PSQL -d template1 -At -F ' ' \