[PATCH] backup: Fix trivial typo and error message issues

Lists: pgsql-hackers
From: zengman <zengman(at)halodbtech(dot)com>
To: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: [PATCH] backup: Fix trivial typo and error message issues
Date: 2026-01-15 13:02:42
Message-ID: tencent_0F2949C4594556F672CF4658@qq.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

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

Attachment Content-Type Size
0001-Update-error-message-in-AddWALInfoToBackupManifest-f.patch application/octet-stream 1.7 KB

From: Steven Niu <niushiji(at)gmail(dot)com>
To: zengman <zengman(at)halodbtech(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] backup: Fix trivial typo and error message issues
Date: 2026-01-15 14:20:36
Message-ID: MN2PR15MB3021690953A35A1E9D34BEE1A78CA@MN2PR15MB3021.namprd15.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

From: zengman <zengman(at)halodbtech(dot)com>
Sent: Thursday, January 15, 2026 21:02
To: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)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


From: Aditya Gollamudi <adigollamudi(at)gmail(dot)com>
To: Steven Niu <niushiji(at)gmail(dot)com>
Cc: zengman <zengman(at)halodbtech(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] backup: Fix trivial typo and error message issues
Date: 2026-01-17 20:22:54
Message-ID: CAD-KL_GVWtMA70t+mW_JBWRUpnt7KqqwGF-PGO8ELgjqUfXpdA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Jan 15, 2026 at 6:20 AM Steven Niu <niushiji(at)gmail(dot)com> wrote:

> From: zengman <zengman(at)halodbtech(dot)com>
> Sent: Thursday, January 15, 2026 21:02
> To: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)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


From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Aditya Gollamudi <adigollamudi(at)gmail(dot)com>
Cc: Steven Niu <niushiji(at)gmail(dot)com>, zengman <zengman(at)halodbtech(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] backup: Fix trivial typo and error message issues
Date: 2026-01-18 07:20:54
Message-ID: aWyJ1mfZ1mO_z9Pf@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

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


From: zengman <zengman(at)halodbtech(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Steven Niu <niushiji(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Aditya Gollamudi <adigollamudi(at)gmail(dot)com>
Subject: Re: [PATCH] backup: Fix trivial typo and error message issues
Date: 2026-01-18 11:40:02
Message-ID: tencent_5F1076723841DDAE336F0F23@qq.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

> 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