| From: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
|---|---|
| To: | Imran Zaheer <imran(dot)zhir(at)gmail(dot)com> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Fix comments to reference xlogrecovery.c |
| Date: | 2026-06-04 13:32:38 |
| Message-ID: | aiF9IBhr9XkB3TR9@alvherre.pgsql |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2026-06-04 14:04:11 | Re: Heads Up: cirrus-ci is shutting down June 1st |
| Previous Message | Peter Eisentraut | 2026-06-04 13:28:46 | Re: Heads Up: cirrus-ci is shutting down June 1st |