Fix comments to reference xlogrecovery.c
Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.
You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:
docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t139843psql -h localhost -U postgresBuilt from patchset v3 (message #3), July 28, 2026 at 02:53 PM.
Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:
git clone --branch t139843_3 https://github.com/hackorum-dev/postgres.gitIn a checkout you already have, add the fork once:
git remote add hackorum https://github.com/hackorum-dev/postgres.gitthen, for this patchset and every later one:
git fetch hackorum t139843_3 && git checkout t139843_3Patchset v3 (message #3) is on t139843_3
Hi
In commit 70e8186 xlog.c was split to move recovery-related code into
xlogrecovery.c.
Some comments still refer to xlog.c and need to be updated accordingly.
This patch fixes those comments to point to the correct file.
Thanks
Imran Zaheer
Attachments:
v1-0001-Update-comments-to-use-xlogrecovery.c-references.patchtext/x-patch; charset=US-ASCII; name=v1-0001-Update-comments-to-use-xlogrecovery.c-references.patchDownload+5-6
On 2026-Jun-04, Imran Zaheer wrote:
Hi
In commit 70e8186 xlog.c was split to move recovery-related code into
xlogrecovery.c.
Some comments still refer to xlog.c and need to be updated accordingly.
I think it would be better if the comments mentioned the function name
where the operation in question takes place rather than the file name;
for instance
@@ -6223,7 +6223,7 @@ xact_redo_commit(xl_xact_parsed_commit *parsed,
* If a transaction completion record arrives that has as-yet
* unobserved subtransactions then this will not have been fully
* handled by the call to RecordKnownAssignedTransactionIds() in the
- * main recovery loop in xlog.c. So we need to do bookkeeping again to
+ * main recovery loop in PerformWalRecovery(). So we need to do bookkeeping again to
and so on. I think this is more helpful for a reader because they have
a precise point to jump to instead of having to scroll through the file
looking for the place. Also this doesn't get outdated if the function
is moved to a different file (not that this happens very often.)
@@ -118,7 +118,7 @@ StartupProcShutdownHandler(SIGNAL_ARGS) /* * Re-read the config file. * - * If one of the critical walreceiver options has changed, flag xlog.c + * If one of the critical walreceiver options has changed, flag xlogrecovery.c * to restart it. */ static void
This could be, maybe "If ... has changed, make
StartupRequestWalReceiverRestart() aware of that." or something like
that.
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"Las navajas y los monos deben estar siempre distantes" (Germán Poo)
On Thu, Jun 4, 2026 at 6:32 PM Álvaro Herrera <alvherre@kurilemu.de> wrote:
I think it would be better if the comments mentioned the function name
where the operation in question takes place rather than the file name;
for instance@@ -6223,7 +6223,7 @@ xact_redo_commit(xl_xact_parsed_commit *parsed, * If a transaction completion record arrives that has as-yet * unobserved subtransactions then this will not have been fully * handled by the call to RecordKnownAssignedTransactionIds() in the - * main recovery loop in xlog.c. So we need to do bookkeeping again to + * main recovery loop in PerformWalRecovery(). So we need to do bookkeeping again toand so on. I think this is more helpful for a reader because they have
a precise point to jump to instead of having to scroll through the file
looking for the place. Also this doesn't get outdated if the function
is moved to a different file (not that this happens very often.)
Yes I agree.
@@ -118,7 +118,7 @@ StartupProcShutdownHandler(SIGNAL_ARGS) /* * Re-read the config file. * - * If one of the critical walreceiver options has changed, flag xlog.c + * If one of the critical walreceiver options has changed, flag xlogrecovery.c * to restart it. */ static voidThis could be, maybe "If ... has changed, make
StartupRequestWalReceiverRestart() aware of that." or something like
that.
I am not sure whether we should be mentioning the function name which
is just being called a few lines below. So maybe it's better to change
the wording here.
*
- * If one of the critical walreceiver options has changed, flag xlog.c
- * to restart it.
+ * If one of the critical walreceiver options has changed, request the startup
+ * process to restart the walreceiver.
*/
Let me know if this sounds ok.
I am attaching the new version.
Thanks
Imran Zaheer
On Thu, Jun 04, 2026 at 10:29:26PM +0500, Imran Zaheer wrote:
- * If one of the critical walreceiver options has changed, flag xlog.c - * to restart it. + * If one of the critical walreceiver options has changed, request the startup + * process to restart the walreceiver. */Let me know if this sounds ok.
I think that's fine as you are suggesting.
I am attaching the new version.
This is replacing three incorrect references of xlog.c to use the
function name where the main redo loop happens, for a trivial change.
I have grabbed these changes for later, saving them for now on my own
staging branch. If somebody feels that this is worth applying on its
own, feel free to override this decision.
--
Michael