diff options
author | Andres Freund <andres@anarazel.de> | 2022-04-07 11:54:51 -0700 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2022-04-07 11:58:04 -0700 |
commit | dbe29b0d2c96f34b3f3222c6fc1710fcff065f18 (patch) | |
tree | 272298f115e14f0ffb6c9c1c261c62a26ca225f5 | |
parent | 00cb86e75d6dd13a8bc07f79c2cdbe20d96c2d92 (diff) | |
download | postgresql-dbe29b0d2c96f34b3f3222c6fc1710fcff065f18.tar.gz postgresql-dbe29b0d2c96f34b3f3222c6fc1710fcff065f18.zip |
Fix test instability introduced in e349c95d3e9 due to async deduplication.
The statement emitting notifies tried to make sure page boundaries were
crossed, but failed to do so reliably due to deduplication.
Reported-By: chap@anastigmatix.net
Discussion: https://postgr.es/m/20220407185408.n7dvsgqsb3q6uze7@alap3.anarazel.de
-rw-r--r-- | src/test/isolation/expected/stats.out | 22 | ||||
-rw-r--r-- | src/test/isolation/expected/stats_1.out | 22 | ||||
-rw-r--r-- | src/test/isolation/specs/stats.spec | 4 |
3 files changed, 24 insertions, 24 deletions
diff --git a/src/test/isolation/expected/stats.out b/src/test/isolation/expected/stats.out index 7628a5f5da0..12234fbcd9f 100644 --- a/src/test/isolation/expected/stats.out +++ b/src/test/isolation/expected/stats.out @@ -3047,7 +3047,7 @@ step s1_slru_save_stats: step s1_listen: LISTEN stats_test_nothing; step s1_begin: BEGIN; step s1_big_notify: SELECT pg_notify('stats_test_use', - repeat('0', current_setting('block_size')::int / 2)) FROM generate_series(1, 3); + repeat(i::text, current_setting('block_size')::int / 2)) FROM generate_series(1, 3) g(i); pg_notify --------- @@ -3100,7 +3100,7 @@ step s1_slru_save_stats: step s1_listen: LISTEN stats_test_nothing; step s2_big_notify: SELECT pg_notify('stats_test_use', - repeat('0', current_setting('block_size')::int / 2)) FROM generate_series(1, 3); + repeat(i::text, current_setting('block_size')::int / 2)) FROM generate_series(1, 3) g(i); pg_notify --------- @@ -3141,7 +3141,7 @@ step s1_slru_save_stats: step s1_listen: LISTEN stats_test_nothing; step s2_begin: BEGIN; step s2_big_notify: SELECT pg_notify('stats_test_use', - repeat('0', current_setting('block_size')::int / 2)) FROM generate_series(1, 3); + repeat(i::text, current_setting('block_size')::int / 2)) FROM generate_series(1, 3) g(i); pg_notify --------- @@ -3196,7 +3196,7 @@ f (1 row) step s2_big_notify: SELECT pg_notify('stats_test_use', - repeat('0', current_setting('block_size')::int / 2)) FROM generate_series(1, 3); + repeat(i::text, current_setting('block_size')::int / 2)) FROM generate_series(1, 3) g(i); pg_notify --------- @@ -3263,7 +3263,7 @@ f (1 row) step s2_big_notify: SELECT pg_notify('stats_test_use', - repeat('0', current_setting('block_size')::int / 2)) FROM generate_series(1, 3); + repeat(i::text, current_setting('block_size')::int / 2)) FROM generate_series(1, 3) g(i); pg_notify --------- @@ -3330,7 +3330,7 @@ f (1 row) step s2_big_notify: SELECT pg_notify('stats_test_use', - repeat('0', current_setting('block_size')::int / 2)) FROM generate_series(1, 3); + repeat(i::text, current_setting('block_size')::int / 2)) FROM generate_series(1, 3) g(i); pg_notify --------- @@ -3397,7 +3397,7 @@ f (1 row) step s2_big_notify: SELECT pg_notify('stats_test_use', - repeat('0', current_setting('block_size')::int / 2)) FROM generate_series(1, 3); + repeat(i::text, current_setting('block_size')::int / 2)) FROM generate_series(1, 3) g(i); pg_notify --------- @@ -3470,7 +3470,7 @@ f (1 row) step s2_big_notify: SELECT pg_notify('stats_test_use', - repeat('0', current_setting('block_size')::int / 2)) FROM generate_series(1, 3); + repeat(i::text, current_setting('block_size')::int / 2)) FROM generate_series(1, 3) g(i); pg_notify --------- @@ -3543,7 +3543,7 @@ f (1 row) step s2_big_notify: SELECT pg_notify('stats_test_use', - repeat('0', current_setting('block_size')::int / 2)) FROM generate_series(1, 3); + repeat(i::text, current_setting('block_size')::int / 2)) FROM generate_series(1, 3) g(i); pg_notify --------- @@ -3618,7 +3618,7 @@ test_stat_func| | | (1 row) step s2_big_notify: SELECT pg_notify('stats_test_use', - repeat('0', current_setting('block_size')::int / 2)) FROM generate_series(1, 3); + repeat(i::text, current_setting('block_size')::int / 2)) FROM generate_series(1, 3) g(i); pg_notify --------- @@ -3661,7 +3661,7 @@ step s1_slru_save_stats: step s1_listen: LISTEN stats_test_nothing; step s1_begin: BEGIN; step s2_big_notify: SELECT pg_notify('stats_test_use', - repeat('0', current_setting('block_size')::int / 2)) FROM generate_series(1, 3); + repeat(i::text, current_setting('block_size')::int / 2)) FROM generate_series(1, 3) g(i); pg_notify --------- diff --git a/src/test/isolation/expected/stats_1.out b/src/test/isolation/expected/stats_1.out index 1c6533cc878..beb959453de 100644 --- a/src/test/isolation/expected/stats_1.out +++ b/src/test/isolation/expected/stats_1.out @@ -3071,7 +3071,7 @@ step s1_slru_save_stats: step s1_listen: LISTEN stats_test_nothing; step s1_begin: BEGIN; step s1_big_notify: SELECT pg_notify('stats_test_use', - repeat('0', current_setting('block_size')::int / 2)) FROM generate_series(1, 3); + repeat(i::text, current_setting('block_size')::int / 2)) FROM generate_series(1, 3) g(i); pg_notify --------- @@ -3124,7 +3124,7 @@ step s1_slru_save_stats: step s1_listen: LISTEN stats_test_nothing; step s2_big_notify: SELECT pg_notify('stats_test_use', - repeat('0', current_setting('block_size')::int / 2)) FROM generate_series(1, 3); + repeat(i::text, current_setting('block_size')::int / 2)) FROM generate_series(1, 3) g(i); pg_notify --------- @@ -3165,7 +3165,7 @@ step s1_slru_save_stats: step s1_listen: LISTEN stats_test_nothing; step s2_begin: BEGIN; step s2_big_notify: SELECT pg_notify('stats_test_use', - repeat('0', current_setting('block_size')::int / 2)) FROM generate_series(1, 3); + repeat(i::text, current_setting('block_size')::int / 2)) FROM generate_series(1, 3) g(i); pg_notify --------- @@ -3220,7 +3220,7 @@ f (1 row) step s2_big_notify: SELECT pg_notify('stats_test_use', - repeat('0', current_setting('block_size')::int / 2)) FROM generate_series(1, 3); + repeat(i::text, current_setting('block_size')::int / 2)) FROM generate_series(1, 3) g(i); pg_notify --------- @@ -3287,7 +3287,7 @@ f (1 row) step s2_big_notify: SELECT pg_notify('stats_test_use', - repeat('0', current_setting('block_size')::int / 2)) FROM generate_series(1, 3); + repeat(i::text, current_setting('block_size')::int / 2)) FROM generate_series(1, 3) g(i); pg_notify --------- @@ -3354,7 +3354,7 @@ f (1 row) step s2_big_notify: SELECT pg_notify('stats_test_use', - repeat('0', current_setting('block_size')::int / 2)) FROM generate_series(1, 3); + repeat(i::text, current_setting('block_size')::int / 2)) FROM generate_series(1, 3) g(i); pg_notify --------- @@ -3421,7 +3421,7 @@ f (1 row) step s2_big_notify: SELECT pg_notify('stats_test_use', - repeat('0', current_setting('block_size')::int / 2)) FROM generate_series(1, 3); + repeat(i::text, current_setting('block_size')::int / 2)) FROM generate_series(1, 3) g(i); pg_notify --------- @@ -3494,7 +3494,7 @@ f (1 row) step s2_big_notify: SELECT pg_notify('stats_test_use', - repeat('0', current_setting('block_size')::int / 2)) FROM generate_series(1, 3); + repeat(i::text, current_setting('block_size')::int / 2)) FROM generate_series(1, 3) g(i); pg_notify --------- @@ -3567,7 +3567,7 @@ f (1 row) step s2_big_notify: SELECT pg_notify('stats_test_use', - repeat('0', current_setting('block_size')::int / 2)) FROM generate_series(1, 3); + repeat(i::text, current_setting('block_size')::int / 2)) FROM generate_series(1, 3) g(i); pg_notify --------- @@ -3642,7 +3642,7 @@ test_stat_func| | | (1 row) step s2_big_notify: SELECT pg_notify('stats_test_use', - repeat('0', current_setting('block_size')::int / 2)) FROM generate_series(1, 3); + repeat(i::text, current_setting('block_size')::int / 2)) FROM generate_series(1, 3) g(i); pg_notify --------- @@ -3685,7 +3685,7 @@ step s1_slru_save_stats: step s1_listen: LISTEN stats_test_nothing; step s1_begin: BEGIN; step s2_big_notify: SELECT pg_notify('stats_test_use', - repeat('0', current_setting('block_size')::int / 2)) FROM generate_series(1, 3); + repeat(i::text, current_setting('block_size')::int / 2)) FROM generate_series(1, 3) g(i); pg_notify --------- diff --git a/src/test/isolation/specs/stats.spec b/src/test/isolation/specs/stats.spec index a3a18ca03de..f27d11eede7 100644 --- a/src/test/isolation/specs/stats.spec +++ b/src/test/isolation/specs/stats.spec @@ -105,7 +105,7 @@ step s1_slru_save_stats { } step s1_listen { LISTEN stats_test_nothing; } step s1_big_notify { SELECT pg_notify('stats_test_use', - repeat('0', current_setting('block_size')::int / 2)) FROM generate_series(1, 3); + repeat(i::text, current_setting('block_size')::int / 2)) FROM generate_series(1, 3) g(i); } step s1_slru_check_stats { @@ -147,7 +147,7 @@ step s2_table_update_k1 { UPDATE test_stat_tab SET value = value + 1 WHERE key = # SLRU stats steps step s2_big_notify { SELECT pg_notify('stats_test_use', - repeat('0', current_setting('block_size')::int / 2)) FROM generate_series(1, 3); + repeat(i::text, current_setting('block_size')::int / 2)) FROM generate_series(1, 3) g(i); } |