pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
[PATCH] backup: Fix trivial typo and error message issues
5+ messages / 4 participants
[nested] [flat]

Commits from this thread:
  2026-01-18 6bca4b50d0 69ee81932a 05ef2371a3 e8fd6c9fda fbf8df580a f1dc7a5b76  Fix error message related to end TLI in backup manifest
* [PATCH] backup: Fix trivial typo and error message issues
@ 2026-01-15 13:02 zengman <zengman@halodbtech.com>
  2026-01-15 14:20 ` Re: [PATCH] backup: Fix trivial typo and error message issues Steven Niu <niushiji@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: zengman @ 2026-01-15 13:02 UTC (permalink / raw)
  To: pgsql-hackers <pgsql-hackers@lists.postgresql.org>

Hi all,

I noticed two trivial issues in backup-related code:
1. backup_manifest.c: The timeline mismatch error message uses `starttli` instead of `endtli`.
2. basebackup_copy.c: There is a spelling error (sine → since) in the comment above the `PROGRESS_REPORT_BYTE_INTERVAL` macro.

```
inline patch 1: src/backend/backup/backup_manifest.c (+1/-1 lines) download inline-1.patch--- a/src/backend/backup/backup_manifest.c +++ b/src/backend/backup/backup_manifest.c @@ -253,7 +253,7 @@ AddWALInfoToBackupManifest(backup_manifest_info *manifest, XLogRecPtr startptr, if (first_wal_range && endtli != entry->tli) ereport(ERROR, errmsg("expected end timeline %u but found timeline %u", - starttli, entry->tli)); + endtli, entry->tli));
``` ``` - * So we only check it after the number of bytes sine the last check reaches + * So we only check it after the number of bytes since the last check reaches ``` -- Regards, Man Zeng www.openhalo.org Patches and attachments: download all (2 files, .tar.gz)
0001-Update-error-message-in-AddWALInfoToBackupManifest-f.patch (application/octet-stream, 1.7K) download From 70c9f769bf914e983a46ecbe61acbb34dcbea49e Mon Sep 17 00:00:00 2001 From: Man Zeng <zengman@halodbtech.com> Date: Thu, 15 Jan 2026 20:44:36 +0800 Subject: [PATCH] Update error message in AddWALInfoToBackupManifest for clarity Fix typo in comment for progress reporting in basebackup_copy.c --- src/backend/backup/backup_manifest.c | 2 +- src/backend/backup/basebackup_copy.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/backup/backup_manifest.c b/src/backend/backup/backup_manifest.c index 85bc96914dc..c697caef895 100644 --- a/src/backend/backup/backup_manifest.c +++ b/src/backend/backup/backup_manifest.c @@ -253,7 +253,7 @@ AddWALInfoToBackupManifest(backup_manifest_info *manifest, XLogRecPtr startptr, if (first_wal_range && endtli != entry->tli) ereport(ERROR, errmsg("expected end timeline %u but found timeline %u", - starttli, entry->tli)); + endtli, entry->tli)); /* * If this timeline entry matches with the timeline on which the diff --git a/src/backend/backup/basebackup_copy.c b/src/backend/backup/basebackup_copy.c index fecfad9ab7b..07f58b39d8c 100644 --- a/src/backend/backup/basebackup_copy.c +++ b/src/backend/backup/basebackup_copy.c @@ -66,7 +66,7 @@ typedef struct bbsink_copystream * frequently. Ideally, we'd like to send a message when the time since the * last message reaches PROGRESS_REPORT_MILLISECOND_THRESHOLD, but checking * the system time every time we send a tiny bit of data seems too expensive. - * So we only check it after the number of bytes sine the last check reaches + * So we only check it after the number of bytes since the last check reaches * PROGRESS_REPORT_BYTE_INTERVAL. */ #define PROGRESS_REPORT_BYTE_INTERVAL 65536 -- 2.45.2
^ permalink raw reply [nested|flat] 5+ messages in thread

* Re: [PATCH] backup: Fix trivial typo and error message issues
  2026-01-15 13:02 [PATCH] backup: Fix trivial typo and error message issues zengman <zengman@halodbtech.com>
@ 2026-01-15 14:20 ` Steven Niu <niushiji@gmail.com>
  2026-01-17 20:22   ` Re: [PATCH] backup: Fix trivial typo and error message issues Aditya Gollamudi <adigollamudi@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Steven Niu @ 2026-01-15 14:20 UTC (permalink / raw)
  To: zengman <zengman@halodbtech.com>; pgsql-hackers <pgsql-hackers@lists.postgresql.org>

From: zengman <zengman@halodbtech.com>
Sent: Thursday, January 15, 2026 21:02
To: pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Subject: [PATCH] backup: Fix trivial typo and error message issues


Hi all,

I noticed two trivial issues in backup-related code:
1. backup_manifest.c: The timeline mismatch error message uses `starttli` instead of `endtli`.
2. basebackup_copy.c: There is a spelling error (sine → since) in the comment above the `PROGRESS_REPORT_BYTE_INTERVAL` macro.

```
inline patch 1: src/backend/backup/backup_manifest.c (+0/-0 lines) download inline-1.patch--- a/src/backend/backup/backup_manifest.c +++ b/src/backend/backup/backup_manifest.c @@ -253,7 +253,7 @@ AddWALInfoToBackupManifest(backup_manifest_info *manifest, XLogRecPtr startptr,
                if (first_wal_range && endtli != entry->tli)                         ereport(ERROR,                                         errmsg("expected end timeline %u but found timeline %u", -                                                  starttli, entry->tli)); +                                                  endtli, entry->tli)); ``` ``` - * So we only check it after the number of bytes sine the last check reaches + * So we only check it after the number of bytes since the last check reaches ``` -- Regards, Man Zeng www.openhalo.org ________________________________________ Nice catch! Agree that the expected end timeline should be endtli instead of starttli per the comments above the code. And the "sine" is obviously a typo. Regards, Steven ^ permalink raw reply [nested|flat] 5+ messages in thread

* Re: [PATCH] backup: Fix trivial typo and error message issues
  2026-01-15 13:02 [PATCH] backup: Fix trivial typo and error message issues zengman <zengman@halodbtech.com>
  2026-01-15 14:20 ` Re: [PATCH] backup: Fix trivial typo and error message issues Steven Niu <niushiji@gmail.com>
@ 2026-01-17 20:22   ` Aditya Gollamudi <adigollamudi@gmail.com>
  2026-01-18 07:20     ` Re: [PATCH] backup: Fix trivial typo and error message issues Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 5+ messages in thread

From: Aditya Gollamudi @ 2026-01-17 20:22 UTC (permalink / raw)
  To: Steven Niu <niushiji@gmail.com>; +Cc: zengman <zengman@halodbtech.com>; pgsql-hackers <pgsql-hackers@lists.postgresql.org>

On Thu, Jan 15, 2026 at 6:20 AM Steven Niu <niushiji@gmail.com> wrote:

> From: zengman <zengman@halodbtech.com>
> Sent: Thursday, January 15, 2026 21:02
> To: pgsql-hackers <pgsql-hackers@lists.postgresql.org>
> Subject: [PATCH] backup: Fix trivial typo and error message issues
>
>
> Hi all,
>
> I noticed two trivial issues in backup-related code:
> 1. backup_manifest.c: The timeline mismatch error message uses `starttli`
> instead of `endtli`.
> 2. basebackup_copy.c: There is a spelling error (sine → since) in the
> comment above the `PROGRESS_REPORT_BYTE_INTERVAL` macro.
>
> ```
> --- a/src/backend/backup/backup_manifest.c
> +++ b/src/backend/backup/backup_manifest.c
> @@ -253,7 +253,7 @@ AddWALInfoToBackupManifest(backup_manifest_info
> *manifest, XLogRecPtr startptr,
>                 if (first_wal_range && endtli != entry->tli)
>                         ereport(ERROR,
>                                         errmsg("expected end timeline %u
> but found timeline %u",
> -                                                  starttli, entry->tli));
> +                                                  endtli, entry->tli));
> ```
>
> ```
> - * So we only check it after the number of bytes sine the last check
> reaches
> + * So we only check it after the number of bytes since the last check
> reaches
> ```
>
> --
> Regards,
> Man Zeng
> www.openhalo.org
>
>
> ________________________________________
>
> Nice catch! Agree that the expected end timeline should be endtli instead
> of starttli per the comments above the code.
>
> And the "sine" is obviously a typo.
>
> Regards,
> Steven


Patch applies cleanly on current master and builds without issues!

I ran make check successfully. I agree that endtli makes more sense here,
and thanks for fixing the typo.

Note: I wasn’t able to get make installcheck to run cleanly due to local
environment issues, which appear unrelated to this patch.

- Adi Gollamudi

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: [PATCH] backup: Fix trivial typo and error message issues
  2026-01-15 13:02 [PATCH] backup: Fix trivial typo and error message issues zengman <zengman@halodbtech.com>
  2026-01-15 14:20 ` Re: [PATCH] backup: Fix trivial typo and error message issues Steven Niu <niushiji@gmail.com>
  2026-01-17 20:22   ` Re: [PATCH] backup: Fix trivial typo and error message issues Aditya Gollamudi <adigollamudi@gmail.com>
@ 2026-01-18 07:20     ` Michael Paquier <michael@paquier.xyz>
  2026-01-18 11:40       ` Re: [PATCH] backup: Fix trivial typo and error message issues zengman <zengman@halodbtech.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Michael Paquier @ 2026-01-18 07:20 UTC (permalink / raw)
  To: Aditya Gollamudi <adigollamudi@gmail.com>; +Cc: Steven Niu <niushiji@gmail.com>; zengman <zengman@halodbtech.com>; pgsql-hackers <pgsql-hackers@lists.postgresql.org>

On Sat, Jan 17, 2026 at 12:22:54PM -0800, Aditya Gollamudi wrote:
> Patch applies cleanly on current master and builds without issues!
> 
> I ran make check successfully. I agree that endtli makes more sense here,
> and thanks for fixing the typo.

I am parking the typo for later.  We had better backpatch the error
message part as it could lead to an incorrect analysis when should
AddWALInfoToBackupManifest() blurp.  Will do that in a bit.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: [PATCH] backup: Fix trivial typo and error message issues
  2026-01-15 13:02 [PATCH] backup: Fix trivial typo and error message issues zengman <zengman@halodbtech.com>
  2026-01-15 14:20 ` Re: [PATCH] backup: Fix trivial typo and error message issues Steven Niu <niushiji@gmail.com>
  2026-01-17 20:22   ` Re: [PATCH] backup: Fix trivial typo and error message issues Aditya Gollamudi <adigollamudi@gmail.com>
  2026-01-18 07:20     ` Re: [PATCH] backup: Fix trivial typo and error message issues Michael Paquier <michael@paquier.xyz>
@ 2026-01-18 11:40       ` zengman <zengman@halodbtech.com>
  0 siblings, 0 replies; 5+ messages in thread

From: zengman @ 2026-01-18 11:40 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Steven Niu <niushiji@gmail.com>; pgsql-hackers <pgsql-hackers@lists.postgresql.org>; Aditya Gollamudi <adigollamudi@gmail.com>

> I am parking the typo for later.  We had better backpatch the error
> message part as it could lead to an incorrect analysis when should
> AddWALInfoToBackupManifest() blurp.  Will do that in a bit.

Thanks for handling this patch.
Thanks to everyone.

--
Regards,
Man Zeng
www.openhalo.org

^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2026-01-18 11:40 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-01-15 13:02 [PATCH] backup: Fix trivial typo and error message issues zengman <zengman@halodbtech.com>
2026-01-15 14:20 ` Steven Niu <niushiji@gmail.com>
2026-01-17 20:22   ` Aditya Gollamudi <adigollamudi@gmail.com>
2026-01-18 07:20     ` Michael Paquier <michael@paquier.xyz>
2026-01-18 11:40       ` zengman <zengman@halodbtech.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox