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.96) (envelope-from ) id 1wy4Xr-0039bV-0E for pgsql-bugs@arkaria.postgresql.org; Sun, 23 Aug 2026 09:31:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wy4Xp-00HJO9-2K for pgsql-bugs@arkaria.postgresql.org; Sun, 23 Aug 2026 09:31:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wy4Xp-00HJO0-1P for pgsql-bugs@lists.postgresql.org; Sun, 23 Aug 2026 09:31:13 +0000 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.22]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wy4Xl-00000000o0c-1Zht for pgsql-bugs@lists.postgresql.org; Sun, 23 Aug 2026 09:31:13 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1787477468; cv=none; d=strato.com; s=strato-dkim-0002; b=BZAti0X2w/NYMUBtNS2sVnd2MmgXHJEKOd+dfLFvY8dvlMvPHWXhiTkshfHjH/oKjN opFhd7kJxrkaKF3oN4rCdVCg1n6sXvrZyhRvT4+3pFh5ufGF/uv1MALltADallT1G7HR rAuCKsrnmgby7taydJ21lw6aWZQcTntqfPgLDKlB8Z40/MSMnxwM6yZIsgPIY9UTqbMx J2dHEWAYCXxCukF9Ds32alppUoU4gDDTW4fxACwLXV0tB1mpk6DXYQpcmCp6xjfrY5Hr j+aOaiKh8k3LWdeNm/ci/QzB50FDeNEsijVEqMK9dsALAzE6KKaqI2B0uyYBbfDad9HS MYig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1787477468; s=strato-dkim-0002; d=strato.com; h=In-Reply-To:From:References:Cc:To:Subject:Date:Message-ID:Cc:Date: From:Subject:Sender; bh=3cKDrsFmDhx1ZQvTe6tmN0pu7jwIdYCq82zUtW+by30=; b=XdgGY7nDiG94G5X+MtZX1i1M41kt/xr1aJcdNzI+cJLAuk++mag7l1Eb1Ef9YFMoW8 FjmdatLT9Cq3u7JHkC7Ewu8xao84rJFyy03v8E0aCefayf4F+hwOlMJer4Rg2SXFpGrx 6vQqLA/OcYRvXp5zBGfyjYPP9UcE1Lv/QxdMWkqwVi4TSGLOzAajee1gQcGaV+36xUJ7 rPZfvNbTH8Wat/VZxNs48IW/wpqfF2AxU44X2G9+jbP355Jzvyk9BLv8jgG4IPTedMth BXn8qkQU8p29MVkrGu4BSGk7s8WsLIpn6OnTQDZluxT96nlZG9PUhxjC6h0CWra0hvqb n6tw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1787477468; s=strato-dkim-0002; d=jbitc.de; h=In-Reply-To:From:References:Cc:To:Subject:Date:Message-ID:Cc:Date: From:Subject:Sender; bh=3cKDrsFmDhx1ZQvTe6tmN0pu7jwIdYCq82zUtW+by30=; b=W2YtfTKbuwE8IWlmu0l+jMGuG3Jjf6HLFPqLx2oSUp8x22YCqj6NVmclDO/ms0Utik A/dFPdxsK6pFtm3GWcIMJyN1XbOMVdWUApGt2a1FFtfUiNtqyF6HzGm+LpMP2b/LvA/L o4HFKvG4F6C2ejCYe6aOh17P8KfqkSWEpP+CO4w1af3PbjqVcihkRZkswhqHB7JD6vnH pF9C6zrpjwXY414NAzxImILZ3V7ppDyK4dEzbFyFV3EMpPbflbfArsw8bof6iXbty3qo geRvNL1BVQ4lPAIHE7cShy6ME5xvldwK2azERo5wJxnE89Lm9exrGIM2vkhcls/YVsek i7hA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1787477468; s=strato-dkim-0003; d=jbitc.de; h=In-Reply-To:From:References:Cc:To:Subject:Date:Message-ID:Cc:Date: From:Subject:Sender; bh=3cKDrsFmDhx1ZQvTe6tmN0pu7jwIdYCq82zUtW+by30=; b=LWuK9vC+9uDhKQBWDSQ1LvItNY+rXQ1cUPrAR8GCAVyDJcTT1MsuL1F9WS5Dm4X9eJ XQNwLQJvNfguzopci0AQ== X-RZG-AUTH: ":Jm4kf0Khb/yzNwyGkr6R611+JpIbxpU/vUdKufVE/BwSQoubt/s/N4gP" Received: from [11.1.1.169] by smtp.strato.de (RZmta 55.6.2 AUTH) with ESMTPSA id 5bab4927N9V7MzX (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sun, 23 Aug 2026 11:31:07 +0200 (CEST) Content-Type: multipart/mixed; boundary="------------bbRgleDgKEeb4k4jHQlOTvaE" Message-ID: <0865e13a-da93-4ad1-8b93-7b54a1628f04@jbitc.de> Date: Sun, 23 Aug 2026 11:31:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: on 19beta3: repack (concurrently) affects sessions with transaction isolation level repeatable read To: Peter Geoghegan Cc: pgsql-bugs@lists.postgresql.org References: <5d2060d5-8145-40c6-9a2e-4ddb9f6b0fc9@jbitc.de> Content-Language: de-DE, en-US From: Jochen Bandhauer In-Reply-To: Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------bbRgleDgKEeb4k4jHQlOTvaE Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 22.08.2026 21:45, Peter Geoghegan wrote: > On Sat, Aug 22, 2026 at 3:29 AM Jochen Bandhauer wrote: >> while using repack (concurrently) I found a behavior that I didn't >> expect. When running a "repack (concurrently) t;" in one session, >> another session with "transaction isolation level repeatable read" >> reports sometimes 0 for "select count(*) from t;". > This is a documented behavior; "repack concurrently" is allowed to > violate MVCC. There's a warning box about this in the docs for the > repack command [1], which notes "REPACK with the CONCURRENTLY option > is not MVCC-safe, see Section 13.6 for details". > > [1] https://www.postgresql.org/docs/devel/sql-repack.html Hello, thanks, I haven't seen that. I also read that this might change in the future [1]. After some further reading I applied patch [2] that worked for the test case (The second session always showed the correct number of rows). Jochen [1] https://www.postgresql.org/message-id/202504040733.ysuy5gad55md%40alvherre.pgsql [2] https://commitfest.postgresql.org/patch/6957/ -- Mit freundlichen Grüßen Jochen Bandhauer +49 (0)176 29390012 www.jbitc.de --------------bbRgleDgKEeb4k4jHQlOTvaE Content-Type: text/vcard; charset=UTF-8; name="jb.vcf" Content-Disposition: attachment; filename="jb.vcf" Content-Transfer-Encoding: base64 QkVHSU46VkNBUkQNClZFUlNJT046NC4wDQpOOkJhbmRoYXVlcjtKb2NoZW47OzsNCkZOOkpv Y2hlbiBCYW5kaGF1ZXINCkVNQUlMO1BSRUY9MTtUWVBFPXdvcms6amJAamJpdGMuZGUNClVS TDpodHRwczovL3d3dy5qYml0Yy5kZQ0KVEVMO1RZUEU9d29yaztWQUxVRT1URVhUOis0OTE3 NjI5MzkwMDEyDQpUWjpFdXJvcGUvQmVybGluDQpFTkQ6VkNBUkQNCg== --------------bbRgleDgKEeb4k4jHQlOTvaE--