| From: | David Steele <david(at)pgbackrest(dot)org> |
|---|---|
| To: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, 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-24 17:14:08 |
| Message-ID: | daaa144e-c268-4a0b-b1cb-d9bdc56379c3@pgbackrest.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 10/23/26 17:47, Heikki Linnakangas wrote:
> On 23/10/2026 15:42, David Steele wrote:
>
>> It makes the copy out of memory to reduce the time the lock is held,
>> but it could alternately read the pg_control file in the lock as was
>> done by Thomas in c558e6fd92f. If the consensus is that the latter
>> approach is preferred I'm happy to make that change.
> +0.5 for following the example of c558e6fd92f. This isn't performance-
> sensitive so that aspect doesn't matter. But it seems a little
> surprising if a backup might have more up-to-date values of some fields
> than what the SQL functions show.
Another +0.5 from me makes it +1. We know that pg_control in memory can
be ahead of pg_control on disk (for standbys) and we are quite sure that
is not an issue but it seems better not to take the risk for something
that we are going to back patch. Also better to use the same mechanism
everywhere.
I've attached a patch 01 that does that and rebased 02 on it. 02 does
not make any of the changes that you requested in your later message but
I'll take care of those separately. Since minor releases are coming up
it seems better to prioritize 01.
Note that back patching this below PG17 will require also back patching
7606175991f (see commit message for details).
Regards,
-David
| Attachment | Content-Type | Size |
|---|---|---|
| pgcontrol-v17-01-fix-tear.patch | text/plain | 4.0 KB |
| pgcontrol-v17-02-backuplabel-flag.patch | text/plain | 23.6 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kirill Reshke | 2026-10-24 17:19:42 | Do not fail WAL buffers read after on-disk xlog removal |
| Previous Message | Andrey Borodin | 2026-10-24 17:09:03 | Re: Compression of bigger WAL records |