Re: Incorrect checksum in control file with pg_rewind test

From: "Maksim(dot)Melnikov" <m(dot)melnikov(at)postgrespro(dot)ru>
To: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Incorrect checksum in control file with pg_rewind test
Date: 2026-05-12 08:30:55
Message-ID: 4ff7bf45-3a95-471a-8dc2-84a8a3b3924a@postgrespro.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 4/21/26 15:12, Alexander Korotkov wrote:
> Thank you for spotting this issue and proposing a patch. The fork
> builds don't have this problem, because fork replicated contents of
> LocalControlFile to the new process. And the postmaster has
> consistent snapshot of control file as there is no concurrent process
> which could write it and that moment. But EXEC_BACKEND, even with
> your patch, may end up different processes with different contents of
> LocalControlFile. I don't see it could cause a material bug right
> now, but I see this as undesirable divergence between fork and
> EXEC_BACKEND behaviors. I propose an alternative approach copy the
> contents of control file to the new process via BackendParameters.
> This approach solves two problems at once: no torn reads, and no
> divergence between fork and EXEC_BACKEND.

Hi, Alexander!

Thanks for response! Your patch LGTM.

Best regards,
Maksim Melnikov

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message jian he 2026-05-12 08:15:19 Re: COPY ON_CONFLICT TABLE; save duplicated record to another table.