Re: BUG #19730: PostgreSQL `pg_backup_start` accepts newlines in the backup label, producing an unrestorable `backup

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: shihao zhong <zhong950419(at)gmail(dot)com>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "theshallow27(at)gmail(dot)com" <theshallow27(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #19730: PostgreSQL `pg_backup_start` accepts newlines in the backup label, producing an unrestorable `backup
Date: 2026-10-02 04:32:20
Message-ID: ar8z1ClV9rWfAxVo@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Oct 01, 2026 at 10:07:41PM -0600, shihao zhong wrote:
> Fair enough. Patch attached. It is the check from the report, with
> the error wording of b380a56a3f95, and a test next to the "backup
> label too long" one in 020_archive_status.pl.

WFM.

> One thing to note. A label that ends with a newline works today, and
> this patch rejects it. A script that reads the label from a file can
> hit that, so I think this should go to master only.

Of course, this is not something that would go into the stable
branches in any way.

Perhaps other will have some comments. Let's see.
--
Michael

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message shihao zhong 2026-10-02 05:15:50 Re: PostgreSQL 18.6/17.11: standby PANIC on restart after VM truncation
Previous Message shihao zhong 2026-10-02 04:07:41 Re: BUG #19730: PostgreSQL `pg_backup_start` accepts newlines in the backup label, producing an unrestorable `backup