Re: Improve read_local_xlog_page_guts by replacing polling with latch-based waiting

Xuneng Zhou <xunengzhou@gmail.com>

From: Xuneng Zhou <xunengzhou@gmail.com>
To: pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Cc: Alexander Korotkov <aekorotkov@gmail.com>, Heikki Linnakangas <hlinnaka@iki.fi>
Date: 2025-08-28T08:22:55Z
Lists: pgsql-hackers

Attachments

Hi,

Some changes in v3:
1) Update the note of xlogwait.c to reflect the extending of its use
for flush waiting and internal use for both flush and replay waiting.
2) Update the comment above logical_read_xlog_page which describes the
prior-change behavior of read_local_xlog_page.

Best,
Xuneng

Commits

  1. Add infrastructure for efficient LSN waiting

  2. Add pairingheap_initialize() for shared memory usage

  3. Implement WAIT FOR command