pgsql: Fix the random test failure in 001_rep_changes.

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix the random test failure in 001_rep_changes.
Date: 2021-09-01 04:59:33
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix the random test failure in 001_rep_changes.

The check to test whether the subscription workers were restarting after a
change in the subscription was failing. The reason was that the test was
assuming the walsender started before it reaches the 'streaming' state and
the walsender was exiting due to an error before that. Now, the walsender
was erroring out before reaching the 'streaming' state because it tries to
acquire the slot before the previous walsender has exited.

In passing, improve the die messages so that it is easier to investigate
the failures in the future if any.

Reported-by: Michael Paquier, as per buildfarm
Author: Ajin Cherian
Reviewed-by: Masahiko Sawada, Amit Kapila
Backpatch-through: 10, where this test was introduced
Discussion: https://postgr.es/m/[email protected]

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/df6ab94aca9015eebd0fc74da8b9d5cc179a0ced

Modified Files
--------------
src/test/subscription/t/001_rep_changes.pl | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2021-09-01 08:06:33 pgsql: pgbench: Fix bug in measurement of disconnection delays.
Previous Message Peter Geoghegan 2021-09-01 03:39:08 pgsql: VACUUM VERBOSE: Don't report "pages removed".