postgresql/src/include
Alexander Korotkov 7a39f43d88 Extend xlogwait infrastructure with write and flush wait types
Add support for waiting on WAL write and flush LSNs in addition to the
existing replay LSN wait type. This provides the foundation for
extending the WAIT FOR command with MODE parameter.

Key changes are following.
- Add WAIT_LSN_TYPE_STANDBY_WRITE and WAIT_LSN_TYPE_STANDBY_FLUSH to
  WaitLSNType.
- Add GetCurrentLSNForWaitType() to retrieve the current LSN for each wait
  type.
- Add new wait events WAIT_EVENT_WAIT_FOR_WAL_WRITE and
  WAIT_EVENT_WAIT_FOR_WAL_FLUSH for pg_stat_activity visibility.
- Update WaitForLSN() to use GetCurrentLSNForWaitType() internally.

Discussion: https://postgr.es/m/CABPTF7UiArgW-sXj9CNwRzUhYOQrevLzkYcgBydmX5oDes1sjg%40mail.gmail.com
Author: Xuneng Zhou <xunengzhou@gmail.com>
Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Alvaro Herrera <alvherre@kurilemu.de>
2026-01-05 19:56:19 +02:00
..
access Extend xlogwait infrastructure with write and flush wait types 2026-01-05 19:56:19 +02:00
archive Update copyright for 2026 2026-01-01 13:24:10 -05:00
backup Update copyright for 2026 2026-01-01 13:24:10 -05:00
bootstrap Update copyright for 2026 2026-01-01 13:24:10 -05:00
catalog Add parse location to IndexElem. 2026-01-04 14:16:20 -05:00
commands Fix typos and inconsistencies in code and comments 2026-01-05 09:19:15 +09:00
common Fix typos and inconsistencies in code and comments 2026-01-05 09:19:15 +09:00
datatype Update copyright for 2026 2026-01-01 13:24:10 -05:00
executor Update copyright for 2026 2026-01-01 13:24:10 -05:00
fe_utils Update copyright for 2026 2026-01-01 13:24:10 -05:00
foreign Update copyright for 2026 2026-01-01 13:24:10 -05:00
jit Fix typos and inconsistencies in code and comments 2026-01-05 09:19:15 +09:00
lib Update copyright for 2026 2026-01-01 13:24:10 -05:00
libpq Update copyright for 2026 2026-01-01 13:24:10 -05:00
mb Update copyright for 2026 2026-01-01 13:24:10 -05:00
nodes Fix typos and inconsistencies in code and comments 2026-01-05 09:19:15 +09:00
optimizer Fix typos and inconsistencies in code and comments 2026-01-05 09:19:15 +09:00
parser Update copyright for 2026 2026-01-01 13:24:10 -05:00
partitioning Update copyright for 2026 2026-01-01 13:24:10 -05:00
pch Update copyright for 2026 2026-01-01 13:24:10 -05:00
port Fix typos and inconsistencies in code and comments 2026-01-05 09:19:15 +09:00
portability Update copyright for 2026 2026-01-01 13:24:10 -05:00
postmaster Update copyright for 2026 2026-01-01 13:24:10 -05:00
regex Update copyright for 2026 2026-01-01 13:24:10 -05:00
replication Fix typos and inconsistencies in code and comments 2026-01-05 09:19:15 +09:00
rewrite Update copyright for 2026 2026-01-01 13:24:10 -05:00
snowball Update copyright for 2026 2026-01-01 13:24:10 -05:00
statistics Fix typos and inconsistencies in code and comments 2026-01-05 09:19:15 +09:00
storage Fix typos and inconsistencies in code and comments 2026-01-05 09:19:15 +09:00
tcop Update copyright for 2026 2026-01-01 13:24:10 -05:00
tsearch Update copyright for 2026 2026-01-01 13:24:10 -05:00
utils Fix typos and inconsistencies in code and comments 2026-01-05 09:19:15 +09:00
.gitignore Use <stdint.h> and <inttypes.h> for c.h integers. 2024-12-04 15:05:38 +13:00
c.h Fix typos and inconsistencies in code and comments 2026-01-05 09:19:15 +09:00
fmgr.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
funcapi.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
getopt_long.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
Makefile Split some long Makefile lists 2025-12-28 09:17:42 +09:00
meson.build Update copyright for 2026 2026-01-01 13:24:10 -05:00
miscadmin.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
pg_config.h.in Remove unneeded defines from pg_config.h.in 2026-01-05 09:27:19 +09:00
pg_config_manual.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
pg_getopt.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
pg_trace.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
pgstat.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
pgtar.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
pgtime.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
port.h Fix typos and inconsistencies in code and comments 2026-01-05 09:19:15 +09:00
postgres.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
postgres_ext.h Move pg_int64 back to postgres_ext.h 2025-09-16 10:48:56 +02:00
postgres_fe.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
varatt.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
windowapi.h Update copyright for 2026 2026-01-01 13:24:10 -05:00