]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Backport GetWALInsertionTimeLineIfSet()
authorMichael Paquier <michael@paquier.xyz>
Thu, 11 Jun 2026 05:43:07 +0000 (14:43 +0900)
committerMichael Paquier <michael@paquier.xyz>
Thu, 11 Jun 2026 05:43:07 +0000 (14:43 +0900)
commit2a04624daa32a5ada3708f488b7f787de8b8f306
tree85463bf77986d325f9b438b115df4dcf2269db4c
parent18955d412c8228fbb1f1982ea0d6231dae7d9611
Backport GetWALInsertionTimeLineIfSet()

This routine is able to return the WAL insertion timeline.  Contrary to
GetWALInsertionTimeLine(), this can be called before recovery is marked
as done in shared memory, just after InsertTimeLineID has been set.  So
it can offer more flexibility in terms of timeline detection without
depending on RecoveryInProgress().

This routine will be used in a follow-up fix that will be applied down
to v16, and it has been introduced in 53b327f83ea2 (v17~).

Discussion: https://postgr.es/m/7daef094-abf3-4672-bc23-3df4763b16a3@gmail.com
Backpatch-through: 16
src/backend/access/transam/xlog.c
src/include/access/xlog.h