Re: Return pg_control from pg_backup_stop().

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: David Steele <david(at)pgbackrest(dot)org>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, solai v <solai(dot)cdac(at)gmail(dot)com>
Subject: Re: Return pg_control from pg_backup_stop().
Date: 2026-10-28 00:00:44
Message-ID: auE7LJWMYskGO5Qr@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Oct 24, 2026 at 02:25:30PM +0900, Michael Paquier wrote:
> /* ... and pg_control after everything else. */
> - if (lstat(XLOG_CONTROL_FILE, &statbuf) != 0)
> - ereport(ERROR,
> - (errcode_for_file_access(),
> - errmsg("could not stat file \"%s\": %m",
> - XLOG_CONTROL_FILE)));
> - sendFile(sink, XLOG_CONTROL_FILE, XLOG_CONTROL_FILE, &statbuf,
> - false, InvalidOid, InvalidOid,
> - InvalidRelFileNumber, 0, &manifest, 0, NULL, 0);
> + backup_control_file(controlFile);
> + sendFileWithContent(sink, XLOG_CONTROL_FILE,
> + (char *) controlFile, PG_CONTROL_FILE_SIZE,
> + &manifest);
>
> Yep, that's clearly something that should be backpatched, at quick
> glance. Heikki, are you planning to take care of this part?

Hearing nothing, I have added that into my own pipeline and applies
the fix down to v15. v14 has been left out, the branch going EOL soon
with a problem that is extremely going to happen in practice does not
give me a warm feeling. For v15 and v16, I have backpatched
d2c1e18de9d1 first. The fix has been applied as of 4a92c8c29bd0.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Haibo Yan 2026-10-27 23:10:54 [PATCH] Prevent lateral dependency cycles in self-join elimination