false failure of test_docoding regression test

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: false failure of test_docoding regression test
Date: 2022-03-04 02:33:47
Message-ID: 20220304.113347.2105652521035137491.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello.

The CF-CI complained on one of my patch for seemingly a reason
unrelated to the patch.

https://cirrus-ci.com/task/5544213843542016?logs=test_world#L1666

> diff -U3 /tmp/cirrus-ci-build/contrib/test_decoding/expected/slot_creation_error.out /tmp/cirrus-ci-build/contrib/test_decoding/output_iso/results/slot_creation_error.out
> --- /tmp/cirrus-ci-build/contrib/test_decoding/expected/slot_creation_error.out 2022-03-03 22:45:04.708072000 +0000
> +++ /tmp/cirrus-ci-build/contrib/test_decoding/output_iso/results/slot_creation_error.out 2022-03-03 22:54:49.621351000 +0000
> @@ -96,13 +96,13 @@
> t
> (1 row)
>
> +step s1_c: COMMIT;
> step s2_init: <... completed>
> FATAL: terminating connection due to administrator command
> server closed the connection unexpectedly
> This probably means the server terminated abnormally
> before or while processing the request.
>
> -step s1_c: COMMIT;
> step s1_view_slot:
> SELECT slot_name, slot_type, active FROM pg_replication_slots WHERE slot_name = 'slot_creation_error'

This comes from the permuattion 'permutation s1_b s1_xid s2_init
s1_terminate_s2 s1_c s1_view_slot'. That means the process
termination by s1_terminate_s2 is a bit delayed until the next s1_c
ends. So it is rare false failure but it is annoying enough on the
CI. It seems to me we need to wait for process termination at the
time. postgres_fdw does that in regression test.

Thoughts?

Simliar use is found in temp-schema-cleanup. There's another possible
instability between s2_advisory and s2_check_schema but this change
alone reduces the chance for false failures.

The attached fixes the both points.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment Content-Type Size
0001-Wait-for-process-termination-during-isolation-tests.patch text/x-patch 3.0 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2022-03-04 03:41:58 Re: PG DOCS - logical replication filtering
Previous Message osumi.takamichi@fujitsu.com 2022-03-04 02:27:51 RE: Add the replication origin name and commit-LSN to logical replication worker errcontext