pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nick Ivanov <nick.ivanov@enterprisedb.com>
To: Shashishekar Hullahally Anantharamu <shashi.h.ananth@gmail.com>
To: pgsql-hackers@lists.postgresql.org
Cc: nick ivanov <nick@thebeaches.online>
Subject: Re: Possible race condition in pg_basebackup
Date: Sat, 19 Sep 2026 14:50:00 +0100
Message-ID: <2d34ff63-cc04-4803-a1b9-7f46f9415bab@enterprisedb.com> (raw)
In-Reply-To: <178970056161.1097.10980781935869625049.pgcf@coridan.postgresql.org>
References: <CALP_NYTTvKzJ+chEUXLsyGaM+HYcP1WwGwXkZEnDfv-7FbPowQ@mail.gmail.com>
	<2A5B29E9-658D-4AD7-8879-C6169D1327E3@yandex-team.ru>
	<178970056161.1097.10980781935869625049.pgcf@coridan.postgresql.org>

Hello Shashishekar,

Thank you very much for your review and tests, much appreciated.

Nick

On 18/09/2026 04:02, Shashishekar Hullahally Anantharamu wrote:
> The following review has been posted through the commitfest application:
> make installcheck-world:  not tested
> Implements feature:       tested, passed
> Spec compliant:           not tested
> Documentation:            not tested
>
> Hi Andrey and Nick,
>
> I reviewed the v3 two-patch series against PostgreSQL commit 94670ba6d56.
>
> Both patches applied cleanly, and git diff --check reported no errors. I configured the build with assertions, debug support, TAP tests, and injection points enabled. The build completed successfully without warnings or errors.
>
> The implementation moves creation of the WAL-streaming connection and replication slot before the BASE_BACKUP request. It then passes the same connection to StartLogStreamer(). This closes the interval in which the backup startpoint could previously become unprotected before the requested slot was created.
>
> I also reviewed the new 057_basebackup_slot_race.pl test. It deterministically pauses BASE_BACKUP before the startpoint is returned, forces WAL generation and a checkpoint, and verifies that the startpoint segment remains available. The test covers both permanent and temporary replication slots and verifies successful backup completion and slot cleanup.
>
> Test results:
>
> 057_basebackup_slot_race.pl: PASS, 10 tests
> Complete src/bin/pg_basebackup test suite: PASS, 5 files and 351 tests
> Full make check: PASS
>
> The first component-suite and full-check attempts encountered macOS temporary-install Mach-O paths referring to /usr/local/pgsql/lib/libpq.5.dylib. After correcting those paths only in the disposable temporary installation, the affected tests and complete suites passed. This was a local build-environment issue and did not require any source changes.
>
> I did not find any functional or test-coverage issues with the v3 series. The patch appears ready for committer review.
>
> Regards,
> Shashishekar Hullahally Anantharamu
>
> The new status of this patch is: Ready for Committer






view thread (16+ messages)  latest in thread

Message-ID: <2d34ff63-cc04-4803-a1b9-7f46f9415bab@enterprisedb.com>
Permalink:  ../2d34ff63-cc04-4803-a1b9-7f46f9415bab@enterprisedb.com/
Also on:    postgresql.org/message-id/2d34ff63-cc04-4803-a1b9-7f46f9415bab@enterprisedb.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: nick.ivanov@enterprisedb.com, shashi.h.ananth@gmail.com, pgsql-hackers@lists.postgresql.org, nick@thebeaches.online
  Subject: Re: Possible race condition in pg_basebackup
  In-Reply-To: <2d34ff63-cc04-4803-a1b9-7f46f9415bab@enterprisedb.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox