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 1wxgAn-002ugp-1W for pgsql-bugs@arkaria.postgresql.org; Sat, 22 Aug 2026 07:29:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wxgAm-00FjTn-1L for pgsql-bugs@arkaria.postgresql.org; Sat, 22 Aug 2026 07:29:48 +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.96) (envelope-from ) id 1wxgAm-00FjTe-0K for pgsql-bugs@lists.postgresql.org; Sat, 22 Aug 2026 07:29:48 +0000 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.161]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wxgAj-00000001rM8-0j8i for pgsql-bugs@lists.postgresql.org; Sat, 22 Aug 2026 07:29:47 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1787383781; cv=none; d=strato.com; s=strato-dkim-0002; b=apHO8Ut6wS7JCa1W1pCvJJcWZ7ZRLqtFtJFVVWTilBDRj+8OmRqjbXJGe/uLUEPppG Rlb+jHQF5W655Bj/k2G8uG5JQAJPJgUnSK6MFjfTqBdqfgslDdLqHdFtTwmkHq8W8ccH H6F40/Xo+NMspHoWD96Ya/2Uaq0ZcMlN9vd+1E1kkDRboAjBHIk2ceWnEdRn46pYxrGl m/bJFZi+YRxHOlDrGvhk5bHujMnxkAmWjHXFfvyrTbKRYHmrHLzEyGmSi6ZeGZXHhvM3 /aXMOzGn1+vjOgdq+zdh7hU40i9OxX5Ol5a1yrfQRgDEckBSIdXL7ls0Q2PxOrLxpkce p6ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1787383781; s=strato-dkim-0002; d=strato.com; h=Subject:From:To:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=a4WFJCICihcy0eBW2OkmD+UjKqYHhYV2Hlh1belqAdI=; b=pouFWJfy2WDWN32liRh2wguQGcJdVRgCZlYIRUxSk0RTOe5oenMyxKMaD5AgNHbWl0 2h6gGU4Ny9trr10Nx/bcNZcvjtajmu5iroO82rwkMnZUp3eZTVkC1ACVpsfAoqimji7L Wt3N6Ltxfn8rN3nJArVz+fNnVBZ6qz4u2RxauFYRIERDKjnjTPb9bMYM3SZgLfLloC2y OB5uvmBAy86rUJLoAdLhtPrnR3/Qmu5Y8Zars5U1NH+irZAgVGU6drOg5bm/wLnxK298 Mm5vsHrPX5azJNCVYEQJeA/T3VVHhG0bN8ugf2eMRBOgKgZDxIWbFSjtNIqysL6rwHvW XbIg== 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=1787383781; s=strato-dkim-0002; d=jbitc.de; h=Subject:From:To:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=a4WFJCICihcy0eBW2OkmD+UjKqYHhYV2Hlh1belqAdI=; b=KP2x9hRPOsw0aebJNZ3s8jeR1JImPdy2EVEazPNEdhx0yrQf+9hhEbg/zxHWvQXifo 3CtLU46bvOtYf99iDSnbyVY7IzOv9rTa42KcfRuOxmfV0xtH4pikezgVNCAJAvX4BkC6 z0gOzPFgHXhKWnffiygMCJTHkc6vOIlpL4EYXllBH2FVxGpQ4l2F1lGOEcDi5g4VeJKN 724K6xoj5VenQYQ/VvJ4sQRJ9kSbQ90if1tMpXICviP6t/pQeE6VgRKUX3/MS0m8C6T4 sPGe8NELQDbKCxhKVnkjfaZWmjHflY1mTrrJoc7y/JbGxvxCiwpI71KVAD62kte7fwXu 792w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1787383781; s=strato-dkim-0003; d=jbitc.de; h=Subject:From:To:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=a4WFJCICihcy0eBW2OkmD+UjKqYHhYV2Hlh1belqAdI=; b=tmbvQ8K0fEnSaxI8Hw5G40G1Yu+agfyezkeKM7VTjxXUXlJA1EHMy20S6aT2nH+haW 3OftXeGCDjB0P/KLs2DA== 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 5bab4927M7TfKBh (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate) for ; Sat, 22 Aug 2026 09:29:41 +0200 (CEST) Content-Type: multipart/mixed; boundary="------------Pwsom5cs3BTQyZh4KHTTaqAb" Message-ID: <5d2060d5-8145-40c6-9a2e-4ddb9f6b0fc9@jbitc.de> Date: Sat, 22 Aug 2026 09:29:41 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: de-DE, en-US To: pgsql-bugs@lists.postgresql.org From: Jochen Bandhauer Subject: on 19beta3: repack (concurrently) affects sessions with transaction isolation level repeatable read 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. --------------Pwsom5cs3BTQyZh4KHTTaqAb Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hello, 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;". PostgreSQL Version: PostgreSQL 19beta3 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 14.3.1 20251022 (Red Hat 14.3.1-4), 64-bit configure command: ./configure --prefix=/home/postgres/pginstall OS: Red Hat Enterprise Linux 10.2 (Coughlan) uname -a: Linux lin8.fritz.box 6.12.0-211.44.1.el10_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Aug  4 03:10:19 EDT 2026 x86_64 GNU/Linux Test Case: -- create table drop table if exists t; create table t (     col1 bigint primary key,     col2 text default 'default text' ); insert into t (col1) select g from generate_series(1, 10000) as g; Session 1 runs from time to time: repack (concurrently) t; Session 2 runs the following script with:  while true; do psql mydb -f ./s2.sql; sleep 0.1; done| grep -v "^$" Script s2.sql: \pset tuples_only on \o /dev/null begin; set transaction isolation level repeatable read; select 1; select pg_sleep(1); \o select count(*) from t; \o /dev/null end; Output Session 2:  10000  10000      0  10000  10000      0  10000  10000  10000      0  10000  10000      0  10000 0 always when Session 1 runs: repack (concurrently) t; Expected Output: Always 10000 Only the (concurrently) option shows this behavior. Wehen using "repack t;" or "repack t using index t_pkey;" the output is always 10000. Thanks Jochen -- Mit freundlichen Grüßen Jochen Bandhauer +49 (0)176 29390012 www.jbitc.de --------------Pwsom5cs3BTQyZh4KHTTaqAb Content-Type: text/vcard; charset=UTF-8; name="jb.vcf" Content-Disposition: attachment; filename="jb.vcf" Content-Transfer-Encoding: base64 QkVHSU46VkNBUkQNClZFUlNJT046NC4wDQpOOkJhbmRoYXVlcjtKb2NoZW47OzsNCkZOOkpv Y2hlbiBCYW5kaGF1ZXINCkVNQUlMO1BSRUY9MTtUWVBFPXdvcms6amJAamJpdGMuZGUNClVS TDpodHRwczovL3d3dy5qYml0Yy5kZQ0KVEVMO1RZUEU9d29yaztWQUxVRT1URVhUOis0OTE3 NjI5MzkwMDEyDQpUWjpFdXJvcGUvQmVybGluDQpFTkQ6VkNBUkQNCg== --------------Pwsom5cs3BTQyZh4KHTTaqAb--