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

Commita360f95

Browse files
committed
Remove race-prone hot_standby_feedback test cases in 001_stream_rep.pl.
This script supposed that if it turned hot_standby_feedback on and thenshut down the standby server, at least one feedback message would beguaranteed to be sent before the standby stops. But there is no suchguarantee, if the standby's walreceiver process is slow enough --- andwe've seen multiple failures in the buildfarm showing that that doeshappen in practice. While we could rearrange the walreceiver logic tomake it less likely, it seems probably impossible to create a reallybulletproof guarantee of that sort; and if we tried, we might createsituations where the walreceiver wouldn't react in a timely manner toshutdown commands. It seems better instead to remove the script'sassumption that feedback will occur before shutdown.But once we do that, these last few tests seem quite redundant withthe earlier tests in the script. So let's just drop them altogetherand save some buildfarm cycles.Backpatch to v10 where these tests were added.Discussion:https://postgr.es/m/1922.1531592205@sss.pgh.pa.us
1 parent701fd0b commita360f95

File tree

1 file changed

+1
-25
lines changed

1 file changed

+1
-25
lines changed

‎src/test/recovery/t/001_stream_rep.pl

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use warnings;
44
use PostgresNode;
55
use TestLib;
6-
use Test::Moretests=>28;
6+
use Test::Moretests=>26;
77

88
# Initialize master node
99
my$node_master = get_new_node('master');
@@ -282,27 +282,3 @@ sub replay_check
282282
is($xmin,'','xmin of cascaded slot null with hs feedback reset');
283283
is($catalog_xmin,'',
284284
'catalog xmin of cascaded slot still null with hs_feedback reset');
285-
286-
note"re-enabling hot_standby_feedback and disabling while stopped";
287-
$node_standby_2->safe_psql('postgres',
288-
'ALTER SYSTEM SET hot_standby_feedback = on;');
289-
$node_standby_2->reload;
290-
291-
$node_master->safe_psql('postgres',qq[INSERT INTO tab_int VALUES (11000);]);
292-
replay_check();
293-
294-
$node_standby_2->safe_psql('postgres',
295-
'ALTER SYSTEM SET hot_standby_feedback = off;');
296-
$node_standby_2->stop;
297-
298-
($xmin,$catalog_xmin) =
299-
get_slot_xmins($node_standby_1,$slotname_2,"xmin IS NOT NULL");
300-
isnt($xmin,'','xmin of cascaded slot non-null with postgres shut down');
301-
302-
# Xmin from a previous run should be cleared on startup.
303-
$node_standby_2->start;
304-
305-
($xmin,$catalog_xmin) =
306-
get_slot_xmins($node_standby_1,$slotname_2,"xmin IS NULL");
307-
is($xmin,'',
308-
'xmin of cascaded slot reset after startup with hs feedback reset');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp