From: | Amit Kapila <akapila(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Fix the intermittent buildfarm failures in 040_standby_failover_ |
Date: | 2024-04-08 08:03:59 |
Message-ID: | E1rtjyw-0015t2-QL@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
Fix the intermittent buildfarm failures in 040_standby_failover_slots_sync.
It is possible that even if the primary waits for the subscriber to catch
up and then disables the subscription, the XLOG_RUNNING_XACTS record gets
inserted between the two steps by bgwriter and walsender processes it.
This can move the restart_lsn of the corresponding slot in an
unpredictable way which further leads to slot sync failure.
To ensure predictable behaviour, we drop the subscription and manually
create the slot before the test. The other idea we discussed to write a
predictable test is to use injection points to control the bgwriter
logging XLOG_RUNNING_XACTS but that needs more analysis. We can add a
separate test using injection points.
Per buildfarm
Author: Hou Zhijie
Reviewed-by: Amit Kapila, Shveta Malik
Discussion: https://postgr.es/m/CAA4eK1JD8h_XLRsK_o_Xh=5MhTzm+6d4Cb4_uPgFJ2wSQDah=g@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/6f3d8d5e7cc2f2e2367cd6da6f8affe98d1f5729
Modified Files
--------------
.../recovery/t/040_standby_failover_slots_sync.pl | 62 +++++++++-------------
1 file changed, 24 insertions(+), 38 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Korotkov | 2024-04-08 08:23:44 | pgsql: Custom reloptions for table AM |
Previous Message | John Naylor | 2024-04-08 07:44:28 | pgsql: Use bump context for TID bitmaps stored by vacuum |
From | Date | Subject | |
---|---|---|---|
Next Message | Andrey M. Borodin | 2024-04-08 08:05:36 | Re: Logging parallel worker draught |
Previous Message | Peter Eisentraut | 2024-04-08 08:02:18 | Re: Speed up clean meson builds by ~25% |