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

Commitef49305

Browse files
committed
Force synchronous commit to be enabled for all test_decoding tests.
Without that the tests fail when forced to be run against a clusterwith synchronous_commit = off (as the WAL might not yet be flushed todisk by the point logical decoding gets called, and thus the expectedoutput breaks). Most tests already do that, add it to a few newer tests.Author: Andres Freund
1 parentf82d4d6 commitef49305

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

‎contrib/test_decoding/expected/truncate.out

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
-- predictability
2+
SET synchronous_commit = on;
13
SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_decoding');
24
?column?
35
----------

‎contrib/test_decoding/specs/oldest_xmin.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ teardown
1717
}
1818

1919
session"s0"
20+
setup {SETsynchronous_commit=on; }
2021
step"s0_begin" {BEGIN; }
2122
step"s0_getxid" {SELECTtxid_current()ISNULL; }
2223
step"s0_alter" {ALTERTYPEbasketDROPATTRIBUTEmangos; }
@@ -26,6 +27,7 @@ step "s0_vacuum" { VACUUM pg_attribute; }
2627
step"s0_get_changes" {SELECTdataFROMpg_logical_slot_get_changes('isolation_slot',NULL,NULL,'include-xids','0','skip-empty-xacts','1'); }
2728

2829
session"s1"
30+
setup {SETsynchronous_commit=on; }
2931
step"s1_begin" {BEGIN; }
3032
step"s1_insert" {INSERTINTOharvestVALUES ((1,2,3)); }
3133
step"s1_commit" {COMMIT; }

‎contrib/test_decoding/specs/snapshot_transfer.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ teardown
1717
}
1818

1919
session"s0"
20+
setup {SETsynchronous_commit=on; }
2021
step"s0_begin" {BEGIN; }
2122
step"s0_begin_sub0" {SAVEPOINTs0; }
2223
step"s0_log_assignment" {SELECTtxid_current()ISNULL; }
@@ -30,6 +31,7 @@ step "s0_commit" { COMMIT; }
3031
step"s0_get_changes" {SELECTdataFROMpg_logical_slot_get_changes('isolation_slot',NULL,NULL,'include-xids','0','skip-empty-xacts','1'); }
3132

3233
session"s1"
34+
setup {SETsynchronous_commit=on; }
3335
step"s1_produce_new_snap" {ALTERTABLEharvestADDCOLUMNmangosint; }
3436

3537
# start top-level without base snap, get base snap in subxact, then create new

‎contrib/test_decoding/sql/truncate.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
-- predictability
2+
SET synchronous_commit=on;
3+
14
SELECT'init'FROM pg_create_logical_replication_slot('regression_slot','test_decoding');
25

36
CREATETABLEtab1 (idserial unique, dataint);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp