Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x7vSU-00000000oDD-1Gum for pgsql-hackers@arkaria.postgresql.org; Sat, 19 Sep 2026 13:50:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1x7vST-000000052W8-25DL for pgsql-hackers@arkaria.postgresql.org; Sat, 19 Sep 2026 13:50:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x7vST-000000052Vz-0pNZ for pgsql-hackers@lists.postgresql.org; Sat, 19 Sep 2026 13:50:25 +0000 Received: from mail-wm2-x11.google.com ([2a00:1450:4864:31::11]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1x7vSL-00000000CbM-1Gq7 for pgsql-hackers@lists.postgresql.org; Sat, 19 Sep 2026 13:50:18 +0000 Received: by mail-wm2-x11.google.com with SMTP id 5b1f17b1804b1-49cd4ba9f68so22378865e9.1 for ; Sat, 19 Sep 2026 06:50:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1789825801; x=1790430601; darn=lists.postgresql.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=qpCbVbGWXUHdL1KUenrd2uRh5wtuGWbkQDPqOPUwNIY=; b=c4uZgn2xrh2qd80FqKBGGux6IaiawfNTHC8ctUhshc3OPKKQN1DNOGm/hdXxhaMQ2U TfOeeXm1Q9pwlXZ3CU7bzPiOMTIagssq4FiI/+wQlNY5BxmVSE1isPzO0fb8HHFsZVUO uDuC5+ybbBcVlBNa0JTgo9FTd0e8EuG8dU4arBCkykTVqUQhj8MfeBgAGuOQ4/0L8lEj PKPGrOD2ks5kJx1A52NYJ15CU25lNTB9ZiUcQJ7PF0HX9UDqFnXzEKZ/ImXhY9m84ybb 2oM/cp/GxMatQ7bwvQnXLS2pCj5Ad6MflKr+OCC6fNr5y4UWPlTFcd3Zb0VTzOgb5i30 +D8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789825801; x=1790430601; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=qpCbVbGWXUHdL1KUenrd2uRh5wtuGWbkQDPqOPUwNIY=; b=DY2GdY6CUIIVG8pMWODvZpWzp82ULj5lsytYwPSgxrmScS5dcM9o+d8fJGlaeP6lbj ZKmcsqU+QtVDajJqYaXoq0e+hv0ohNp7F/Z+dJ9vMqbTTQfNgtrKwir3z78sgyU8pmo1 DhqWPlbxBJ6N3HGIXRaX09qL7RMlVRpCfuWGqSe9+wQKd7wp/C58LrFceqzRCyc8ecZo MsF/htwmjj5QazhgSW+xNUOkv1DwiH0q0/itgq9lam31UOjEG7LbSL0sr5gYMN9rb/m6 T+2DHI1XCXRFOPvzodDS1/ZTOvsm1NrW2G7tzTdcc7C/AuFIobq8K9K+DuXuXecvqZ/q ZerQ== X-Forwarded-Encrypted: i=1; AKwUvBwlWSk5xnEAkABDggmqyx9fUBblT3SrF8bZ9grmjgYh5ctV0cHE0QYjXrn4c06kXKExqXSuBbBIZBjNR2Wm@lists.postgresql.org X-Gm-Message-State: AFuF++nbqItDjA8iepNsN+IW9mRZXl1a0BP+Ju6fDX9wLxjvMgBqe5eM MB8aHquyHcPRUtmoSddauu959cmmMlQuiWvm6VG6xeK3bs7NtK4hI+9nccr82/FAwQ== X-Gm-Gg: AYBFou32OX0immCoVOvETzpX+pRlMmZT1vdjdI88t0q4bkbDgD57g4MiUIe+SA5SWpA bacu1kJVulm0ZieMFXj5fRsVm/jI6HzsBfEnwuV4vXiemf4GZ32IXOroeNXIXea6bx5WPOlMDDi 6SeIcEYs1efDpeiFmzttlKRX1r/227+je3eGkGpvkgl1Yr9i+Wy2Rt2AWBVTMk0TNIRfu3ViGqN S9gO7TnTmHKwoCrv5Fl2IyfAeuaui0g4ppDdNVG4YEK1RYPBZuOQDECs8cStp5W6rQxMGj0R92S JYZwORDr4+x4kAff+LDimalVFqBXm8Di3YY56RrZLrdiAzJsDwBUFtL1p4wCTqvI4p8NTecIDuo dAVN495tiTK4SvDddJl1CE/lh7R4liH9+eKR27VIUdezFWatMqBMBWR+2htPkUc7Z1/Wpb+ukc1 gOPu7TdhKf1ptxGWK1ltDHXiCXu25x1IRuZpLHivVtrS5j4MKJFTW1ID9GevUIcU3ibV5KPW/FV 3K0hFj7WmqtHaZDgPA7/kjQLg+d0QMvrFyylksvUYawd0F/DdtyZCzYuv5kWfUG2vuQ3Q+17dk1 u4JoaNVj3OJWAkk= X-Received: by 2002:a05:600c:138c:b0:49d:1842:f001 with SMTP id 5b1f17b1804b1-49fc56ef0cbmr74706225e9.14.1789825801522; Sat, 19 Sep 2026 06:50:01 -0700 (PDT) Received: from [192.168.88.235] ([163.116.177.180]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49fcd8bf159sm62476945e9.10.2026.09.19.06.50.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 19 Sep 2026 06:50:01 -0700 (PDT) Message-ID: <2d34ff63-cc04-4803-a1b9-7f46f9415bab@enterprisedb.com> Date: Sat, 19 Sep 2026 14:50:00 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Possible race condition in pg_basebackup To: Shashishekar Hullahally Anantharamu , pgsql-hackers@lists.postgresql.org Cc: nick ivanov References: <2A5B29E9-658D-4AD7-8879-C6169D1327E3@yandex-team.ru> <178970056161.1097.10980781935869625049.pgcf@coridan.postgresql.org> Content-Language: en-US From: Nick Ivanov In-Reply-To: <178970056161.1097.10980781935869625049.pgcf@coridan.postgresql.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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