Re: Timing issue in pg_basebackup

From: Jesper St John <admin(at)zonezero(dot)se>
To: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, Jesper St John <jesper(at)stjohn(dot)se>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>, Kirill Reshke <reshkekirill(at)gmail(dot)com>
Subject: Re: Timing issue in pg_basebackup
Date: 2026-11-17 11:35:37
Message-ID: 4F71E8F4-32D9-4B37-9DA9-203564F00692@zonezero.se
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi!

Sorry, even though I’m pretty sure I searched for similar issues before posting, I missed it.

Big thanks to Zsolt, Joao and Kirill for your input.

I think combining work sounds like the reasonable thing to do. I’d be happy to help out in either thread.

If any of you already know if one patch is preferable over the other, please do tell. If not I’ll review and try posting a follow-up.

I’ve slowly started to implement a “start streaming directly after slot creation”-functionality and perhaps that could work with either patch.

//Jesper

Sent from my iPhone

> On 16 Nov 2026, at 13:09, Andrey Borodin <x4mmm(at)yandex-team(dot)ru> wrote:
> Hi Magnus, all,
>
> Nick reported the same startpoint/slot race in August [0], tracked in
> CF 7233 [1]. The client patch there opens the streaming connection and
> creates its slot before BASE_BACKUP, but starts streaming only after
> receiving the backup startpoint. Your proposal goes further than that.
>
> We also discussed cleanup of a newly created permanent slot when
> BASE_BACKUP refuses to start. Zsolt's reports of slot invalidation and
> idle timeout are relevant to that approach too.
>
> Could we combine the work and keep both threads linked from one CF
> entry? This thread is currently tracked separately as CF 7613 [2].
>
> Thank you!
>
> Best regards, Andrey Borodin.
>
> [0] https://www.postgresql.org/message-id/CALP_NYTTvKzJ+chEUXLsyGaM+HYcP1WwGwXkZEnDfv-7FbPowQ@mail.gmail.com
> [1] https://commitfest.postgresql.org/patch/7233/
> [2] https://commitfest.postgresql.org/patch/7613/

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Nitin Motiani 2026-11-17 12:03:35 Re: BUG #19737: Empty `JSON_OBJECT` cannot use documented `ON NULL` or unique-key clauses
Previous Message Ayush Tiwari 2026-11-17 10:03:47 Re: PG 18 JIT regression: int4range hash breaks multi-key GROUP BY