Skip to content

Commit

Permalink
Fix timeout value used in XLogWaitForReplayOf (#9937)
Browse files Browse the repository at this point in the history
The previous value assumed usec precision, while the timeout used is in
milliseconds, causing replica backends to wait for (potentially) many
hours for WAL replay without the expected progress reports in logs.

This fixes the issue.

Reported-By: Alexander Lakhin <exclusion@gmail.com>

## Problem


neondatabase/postgres#279 (comment)

The timeout value was configured with the assumption the indicated value
would be microseconds, where it's actually milliseconds. That causes the
backend to wait for much longer (2h46m40s) before it emits the "I'm
waiting for recovery" message. While we do have wait events configured
on this, it's not great to have stuck backends without clear logs, so
this fixes the timeout value in all our PostgreSQL branches.

## PG PRs

* PG14: neondatabase/postgres#542
* PG15: neondatabase/postgres#543
* PG16: neondatabase/postgres#544
* PG17: neondatabase/postgres#545
  • Loading branch information
MMeent authored Nov 29, 2024
1 parent c848f25 commit 973a8d2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion vendor/postgres-v14
2 changes: 1 addition & 1 deletion vendor/postgres-v15
2 changes: 1 addition & 1 deletion vendor/postgres-v16
2 changes: 1 addition & 1 deletion vendor/postgres-v17
8 changes: 4 additions & 4 deletions vendor/revisions.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"v17": [
"17.2",
"3c15b6565f6c8d36d169ed9ea7412cf90cfb2a8f"
"faebe5e5aff5687908504453623778f8515529db"
],
"v16": [
"16.6",
"f5cfc6fa898544050e821ac688adafece1ac3cff"
"13e9e3539419003e79bd9aa29e1bc44f3fd555dd"
],
"v15": [
"15.10",
"aed79ee87b94779cc52ec13e3b74eba6ada93f05"
"d929b9a8b9f32f6fe5a0eac3e6e963f0e44e27e6"
],
"v14": [
"14.15",
"284ae56be2397fd3eaf20777fa220b2d0ad968f5"
"c1989c934d46e04e78b3c496c8a34bcd40ddceeb"
]
}

1 comment on commit 973a8d2

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7070 tests run: 6736 passed, 1 failed, 333 skipped (full report)


Failures on Postgres 16

  • test_sharded_ingest[github-actions-selfhosted-vanilla-1]: release-x86-64
# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_sharded_ingest[release-pg16-github-actions-selfhosted-vanilla-1]"
Flaky tests (3)

Postgres 17

Postgres 15

Code coverage* (full report)

  • functions: 30.3% (8182 of 27046 functions)
  • lines: 47.7% (64850 of 135976 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
973a8d2 at 2024-11-29T20:56:39.757Z :recycle:

Please sign in to comment.