pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix timing-dependent failure in recovery test 004_timeline_switc
7+ messages / 1 participants
[nested] [flat]

* pgsql: Fix timing-dependent failure in recovery test 004_timeline_switc
@ 2025-11-05 07:48  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2025-11-05 07:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix timing-dependent failure in recovery test 004_timeline_switch

The test introduced by 17b2d5ec759c verifies that a WAL receiver
survives across a timeline jump by searching the server logs for
termination messages.  However, it called restart() before the timeline
switch, which kills the WAL receiver and may log the exact message being
checked, hence failing the test.  As TAP tests reuse the same log file
across restarts, a rotate_logfile() is used before the restart so as the
log matching check is not impacted by log entries generated by a
previous shutdown.

Recent changes to file handle inheritance altered I/O timing enough to
make this fail consistently while testing another patch.

While on it, this adds an extra check based on a PID comparison.  This
test may lead to false positives as it could be possible that the WAL
receiver has processed a timeline jump before the initial PID is
grabbed, but it should be good enough in most cases.

Like 17b2d5ec759c, backpatch down to v13.

Author: Bryan Green <dbryan.green@gmail.com>
Co-authored-by: Xuneng Zhou <xunengzhou@gmail.com>
Discussion: https://postgr.es/m/9d00b597-d64a-4f1e-802e-90f9dc394c70@gmail.com
Backpatch-through: 13

Branch
------
REL_18_STABLE

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

Modified Files
--------------
src/test/recovery/t/004_timeline_switch.pl | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix timing-dependent failure in recovery test 004_timeline_switc
@ 2025-11-05 07:48  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2025-11-05 07:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix timing-dependent failure in recovery test 004_timeline_switch

The test introduced by 17b2d5ec759c verifies that a WAL receiver
survives across a timeline jump by searching the server logs for
termination messages.  However, it called restart() before the timeline
switch, which kills the WAL receiver and may log the exact message being
checked, hence failing the test.  As TAP tests reuse the same log file
across restarts, a rotate_logfile() is used before the restart so as the
log matching check is not impacted by log entries generated by a
previous shutdown.

Recent changes to file handle inheritance altered I/O timing enough to
make this fail consistently while testing another patch.

While on it, this adds an extra check based on a PID comparison.  This
test may lead to false positives as it could be possible that the WAL
receiver has processed a timeline jump before the initial PID is
grabbed, but it should be good enough in most cases.

Like 17b2d5ec759c, backpatch down to v13.

Author: Bryan Green <dbryan.green@gmail.com>
Co-authored-by: Xuneng Zhou <xunengzhou@gmail.com>
Discussion: https://postgr.es/m/9d00b597-d64a-4f1e-802e-90f9dc394c70@gmail.com
Backpatch-through: 13

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/13efc28d4b3de60223ddb91cdb4e43e5a706810e

Modified Files
--------------
src/test/recovery/t/004_timeline_switch.pl | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix timing-dependent failure in recovery test 004_timeline_switc
@ 2025-11-05 07:48  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2025-11-05 07:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix timing-dependent failure in recovery test 004_timeline_switch

The test introduced by 17b2d5ec759c verifies that a WAL receiver
survives across a timeline jump by searching the server logs for
termination messages.  However, it called restart() before the timeline
switch, which kills the WAL receiver and may log the exact message being
checked, hence failing the test.  As TAP tests reuse the same log file
across restarts, a rotate_logfile() is used before the restart so as the
log matching check is not impacted by log entries generated by a
previous shutdown.

Recent changes to file handle inheritance altered I/O timing enough to
make this fail consistently while testing another patch.

While on it, this adds an extra check based on a PID comparison.  This
test may lead to false positives as it could be possible that the WAL
receiver has processed a timeline jump before the initial PID is
grabbed, but it should be good enough in most cases.

Like 17b2d5ec759c, backpatch down to v13.

Author: Bryan Green <dbryan.green@gmail.com>
Co-authored-by: Xuneng Zhou <xunengzhou@gmail.com>
Discussion: https://postgr.es/m/9d00b597-d64a-4f1e-802e-90f9dc394c70@gmail.com
Backpatch-through: 13

Branch
------
REL_14_STABLE

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

Modified Files
--------------
src/test/recovery/t/004_timeline_switch.pl | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix timing-dependent failure in recovery test 004_timeline_switc
@ 2025-11-05 07:48  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2025-11-05 07:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix timing-dependent failure in recovery test 004_timeline_switch

The test introduced by 17b2d5ec759c verifies that a WAL receiver
survives across a timeline jump by searching the server logs for
termination messages.  However, it called restart() before the timeline
switch, which kills the WAL receiver and may log the exact message being
checked, hence failing the test.  As TAP tests reuse the same log file
across restarts, a rotate_logfile() is used before the restart so as the
log matching check is not impacted by log entries generated by a
previous shutdown.

Recent changes to file handle inheritance altered I/O timing enough to
make this fail consistently while testing another patch.

While on it, this adds an extra check based on a PID comparison.  This
test may lead to false positives as it could be possible that the WAL
receiver has processed a timeline jump before the initial PID is
grabbed, but it should be good enough in most cases.

Like 17b2d5ec759c, backpatch down to v13.

Author: Bryan Green <dbryan.green@gmail.com>
Co-authored-by: Xuneng Zhou <xunengzhou@gmail.com>
Discussion: https://postgr.es/m/9d00b597-d64a-4f1e-802e-90f9dc394c70@gmail.com
Backpatch-through: 13

Branch
------
master

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

Modified Files
--------------
src/test/recovery/t/004_timeline_switch.pl | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix timing-dependent failure in recovery test 004_timeline_switc
@ 2025-11-05 07:48  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2025-11-05 07:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix timing-dependent failure in recovery test 004_timeline_switch

The test introduced by 17b2d5ec759c verifies that a WAL receiver
survives across a timeline jump by searching the server logs for
termination messages.  However, it called restart() before the timeline
switch, which kills the WAL receiver and may log the exact message being
checked, hence failing the test.  As TAP tests reuse the same log file
across restarts, a rotate_logfile() is used before the restart so as the
log matching check is not impacted by log entries generated by a
previous shutdown.

Recent changes to file handle inheritance altered I/O timing enough to
make this fail consistently while testing another patch.

While on it, this adds an extra check based on a PID comparison.  This
test may lead to false positives as it could be possible that the WAL
receiver has processed a timeline jump before the initial PID is
grabbed, but it should be good enough in most cases.

Like 17b2d5ec759c, backpatch down to v13.

Author: Bryan Green <dbryan.green@gmail.com>
Co-authored-by: Xuneng Zhou <xunengzhou@gmail.com>
Discussion: https://postgr.es/m/9d00b597-d64a-4f1e-802e-90f9dc394c70@gmail.com
Backpatch-through: 13

Branch
------
REL_16_STABLE

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

Modified Files
--------------
src/test/recovery/t/004_timeline_switch.pl | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix timing-dependent failure in recovery test 004_timeline_switc
@ 2025-11-05 07:48  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2025-11-05 07:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix timing-dependent failure in recovery test 004_timeline_switch

The test introduced by 17b2d5ec759c verifies that a WAL receiver
survives across a timeline jump by searching the server logs for
termination messages.  However, it called restart() before the timeline
switch, which kills the WAL receiver and may log the exact message being
checked, hence failing the test.  As TAP tests reuse the same log file
across restarts, a rotate_logfile() is used before the restart so as the
log matching check is not impacted by log entries generated by a
previous shutdown.

Recent changes to file handle inheritance altered I/O timing enough to
make this fail consistently while testing another patch.

While on it, this adds an extra check based on a PID comparison.  This
test may lead to false positives as it could be possible that the WAL
receiver has processed a timeline jump before the initial PID is
grabbed, but it should be good enough in most cases.

Like 17b2d5ec759c, backpatch down to v13.

Author: Bryan Green <dbryan.green@gmail.com>
Co-authored-by: Xuneng Zhou <xunengzhou@gmail.com>
Discussion: https://postgr.es/m/9d00b597-d64a-4f1e-802e-90f9dc394c70@gmail.com
Backpatch-through: 13

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1dad5594c19ed46672b4fbad0527df63e502d444

Modified Files
--------------
src/test/recovery/t/004_timeline_switch.pl | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix timing-dependent failure in recovery test 004_timeline_switc
@ 2025-11-05 07:48  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2025-11-05 07:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix timing-dependent failure in recovery test 004_timeline_switch

The test introduced by 17b2d5ec759c verifies that a WAL receiver
survives across a timeline jump by searching the server logs for
termination messages.  However, it called restart() before the timeline
switch, which kills the WAL receiver and may log the exact message being
checked, hence failing the test.  As TAP tests reuse the same log file
across restarts, a rotate_logfile() is used before the restart so as the
log matching check is not impacted by log entries generated by a
previous shutdown.

Recent changes to file handle inheritance altered I/O timing enough to
make this fail consistently while testing another patch.

While on it, this adds an extra check based on a PID comparison.  This
test may lead to false positives as it could be possible that the WAL
receiver has processed a timeline jump before the initial PID is
grabbed, but it should be good enough in most cases.

Like 17b2d5ec759c, backpatch down to v13.

Author: Bryan Green <dbryan.green@gmail.com>
Co-authored-by: Xuneng Zhou <xunengzhou@gmail.com>
Discussion: https://postgr.es/m/9d00b597-d64a-4f1e-802e-90f9dc394c70@gmail.com
Backpatch-through: 13

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2adf3032841b2257ecd7ec5b1b9301004e4ca538

Modified Files
--------------
src/test/recovery/t/004_timeline_switch.pl | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2025-11-05 07:48 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-11-05 07:48 pgsql: Fix timing-dependent failure in recovery test 004_timeline_switc Michael Paquier <michael@paquier.xyz>
2025-11-05 07:48 pgsql: Fix timing-dependent failure in recovery test 004_timeline_switc Michael Paquier <michael@paquier.xyz>
2025-11-05 07:48 pgsql: Fix timing-dependent failure in recovery test 004_timeline_switc Michael Paquier <michael@paquier.xyz>
2025-11-05 07:48 pgsql: Fix timing-dependent failure in recovery test 004_timeline_switc Michael Paquier <michael@paquier.xyz>
2025-11-05 07:48 pgsql: Fix timing-dependent failure in recovery test 004_timeline_switc Michael Paquier <michael@paquier.xyz>
2025-11-05 07:48 pgsql: Fix timing-dependent failure in recovery test 004_timeline_switc Michael Paquier <michael@paquier.xyz>
2025-11-05 07:48 pgsql: Fix timing-dependent failure in recovery test 004_timeline_switc Michael Paquier <michael@paquier.xyz>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox