Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit93759c6

Browse files
committed
Fix slow animal timeouts in 032_relfilenode_reuse.pl.
Per BF animal chipmunk: CREATE DATABASE could apparently fail due to anAV process being in the template database and not quitting fast enoughfor the 5 second timeout in CountOtherDBBackends(). The test script hadautovacuum_naptime=1s to encourage more activity and opening of fds, butthat wasn't strictly necessary for this test. Take it out.Per BF animal skink: there was a 300s timeout for all tests in thescript, but apparently that was not enough under valgrind. Let's usethe standard timeout $PostgreSQL::Test::Utils::timeout_default, butrestart it for each query we run.Reviewed-by: Robert Haas <robertmhaas@gmail.com>Discussion:https://postgr.es/m/CA%2BhUKGKa8HNJaA24gqiiFoGy0ysndeVoJsHvX_q1-DVLFaGAmw%40mail.gmail.com
1 parentfcab82a commit93759c6

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

‎src/test/recovery/t/032_relfilenode_reuse.pl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
# to avoid "repairing" corruption
1616
full_page_writes=off
1717
log_min_messages=debug2
18-
autovacuum_naptime=1s
1918
shared_buffers=1MB
2019
]);
2120
$node_primary->start;
@@ -29,11 +28,8 @@
2928
has_streaming=> 1);
3029
$node_standby->start;
3130

32-
# To avoid hanging while expecting some specific input from a psql
33-
# instance being driven by us, add a timeout high enough that it
34-
# should never trigger even on very slow machines, unless something
35-
# is really wrong.
36-
my$psql_timeout = IPC::Run::timer(300);
31+
# We'll reset this timeout for each individual query we run.
32+
my$psql_timeout = IPC::Run::timer($PostgreSQL::Test::Utils::timeout_default);
3733

3834
my%psql_primary = (stdin=>'',stdout=>'',stderr=>'');
3935
$psql_primary{run} = IPC::Run::start(
@@ -208,6 +204,12 @@ sub send_query_and_wait
208204
my ($psql,$query,$untl) =@_;
209205
my$ret;
210206

207+
# For each query we run, we'll restart the timeout. Otherwise the timeout
208+
# would apply to the whole test script, and would need to be set very high
209+
# to survive when running under Valgrind.
210+
$psql_timeout->reset();
211+
$psql_timeout->start();
212+
211213
# send query
212214
$$psql{stdin} .=$query;
213215
$$psql{stdin} .="\n";

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp