Skip to content

Installcheck in a loop eventually fails #282

@a-masterov

Description

@a-masterov

Hello!

If we run the installcheck in a loop, e.g.

CNT=0
while make installcheck
do
    let CNT++
done
echo Test failed on run $CNT

it eventually failed.

Errors can look like

diff -U3 /wal2json-wal2json_2_6/expected/include_timestamp.out /wal2json-wal2json_2_6/results/include_timestamp.out
--- /wal2json-wal2json_2_6/expected/include_timestamp.out       2024-04-25 01:02:38.000000000 +0000
+++ /wal2json-wal2json_2_6/results/include_timestamp.out        2024-05-20 10:44:22.432449005 +0000
@@ -15,7 +15,7 @@
 SELECT count(*) = 1, count(distinct ((data::json)->'timestamp')::text) = 1 FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'format-version', '1', 'include-timestamp', '1');
  ?column? | ?column? 
 ----------+----------
- t        | t
+ f        | f
 (1 row)
 
 -- Two rows should have two records and two timestamps
@@ -24,7 +24,7 @@
 SELECT count(*) = 2, count(distinct ((data::json)->'timestamp')::text) = 2 FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'format-version', '1', 'include-timestamp', '1');
  ?column? | ?column? 
 ----------+----------
- t        | t
+ f        | f
 (1 row)
 
 -- Two rows in one transaction should have one record and one timestamp
@@ -32,7 +32,7 @@
 SELECT count(*) = 1, count(distinct ((data::json)->'timestamp')::text) = 1 FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'format-version', '1', 'include-timestamp', '1');
  ?column? | ?column? 
 ----------+----------
- t        | t
+ f        | f
 (1 row)
 
 SELECT 'stop' FROM pg_drop_replication_slot('regression_slot');

They occur randomly in different SQL files.
Maybe it happens due to background maintenance processes like autovacuum

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions