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
