Skip to content

Commit 5d9f5c2

Browse files
committed
Issue a CHECKPOINT just after creating the regression database. Without
this, it's hard to debug core-dump test failures, because WAL replay will enthusiastically remove the core file (along with the rest of the regression database directory). Per recent discussion, not to mention bitter experience.
1 parent bebaf70 commit 5d9f5c2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/test/regress/pg_regress.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! /bin/sh
2-
# $PostgreSQL: pgsql/src/test/regress/pg_regress.sh,v 1.46 2004/08/10 22:24:06 tgl Exp $
2+
# $PostgreSQL: pgsql/src/test/regress/pg_regress.sh,v 1.47 2004/09/22 19:11:19 tgl Exp $
33

44
me=`basename $0`
55
: ${TMPDIR=/tmp}
@@ -510,6 +510,9 @@ fi
510510
# Create the regression database
511511
# We use template0 so that any installation-local cruft in template1
512512
# will not mess up the tests.
513+
# Note: the reason for checkpointing just after creating the new DB is so
514+
# that if we get a backend core dump during the tests, WAL replay won't
515+
# remove the core file.
513516
# ----------
514517

515518
message "creating database \"$dbname\""
@@ -520,6 +523,7 @@ if [ $? -ne 0 ]; then
520523
fi
521524

522525
"$bindir/psql" $psql_options -c "\
526+
checkpoint;
523527
alter database \"$dbname\" set lc_messages to 'C';
524528
alter database \"$dbname\" set lc_monetary to 'C';
525529
alter database \"$dbname\" set lc_numeric to 'C';

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy