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 1xHNUI-00000002yGG-3RUi for pgsql-bugs@arkaria.postgresql.org; Thu, 15 Oct 2026 15:35:23 +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 1xHNUH-00000009n5l-3YjK for pgsql-bugs@arkaria.postgresql.org; Thu, 15 Oct 2026 15:35:21 +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.98.2) (envelope-from ) id 1xHM08-00000009B7Z-4Ati for pgsql-bugs@lists.postgresql.org; Thu, 15 Oct 2026 14:00:08 +0000 Received: from mahout.postgresql.org ([2001:4800:3e1:1::227]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xHM06-00000002FrV-4BMC for pgsql-bugs@lists.postgresql.org; Thu, 15 Oct 2026 14:00:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Message-ID:Date:Reply-To:Cc:From:To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:Sender:Content-ID: Content-Description:In-Reply-To:References; bh=63v/8r+G4KjfZGRgv5VO4nenOFsX/kMhoSJKMe/iPUE=; b=JDlyMfrNie8uvihioIdp08AAFq CMPKvh7DxM+6Tm22QLAvGLNYrhSNiR7Z/6BPyv15cSApUsqk+XgEnk7xjXoecRDY3h56CAbnUI2MM +b02fFxV9v9ukUjtfE+JaQyi6iPoFytqIPHWKT2/nSTi6WZsAOfvaa2GKfIyVVeKPkckrAtmNnpOO IAg8IIBvDKIMPZanyJxFMurYQ/3awlTunbmF5rCM+Wljis24U5cNww4AFwYSMl7Zsa1SI3JShDEWX g6sE/9gxmxb9hQi+JKczGA2i2oEbMeY9m9lRz1bxy9V9u9toYn5BZOROZko6QHEURqb7JMGqcgyl7 D85wMQPQ==; Received: from wrigleys.postgresql.org ([2a02:16a8:dc51::60]) by mahout.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xHM05-00000006HZz-2uou for pgsql-bugs@lists.postgresql.org; Thu, 15 Oct 2026 14:00:05 +0000 Received: from localhost ([127.0.0.1] helo=wrigleys.postgresql.org) by wrigleys.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xHM04-00000001ej3-1SpJ for pgsql-bugs@lists.postgresql.org; Thu, 15 Oct 2026 14:00:04 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #19760: CLUSTER loses a row the transaction inserted and then updated in a rolled-back subtransaction To: pgsql-bugs@lists.postgresql.org From: PG Bug reporting form Cc: alpkeles99@gmail.com Reply-To: alpkeles99@gmail.com, pgsql-bugs@lists.postgresql.org Date: Thu, 15 Oct 2026 13:59:46 +0000 Message-ID: <19760-8f9a0eba17bc8c92@postgresql.org> X-Auto-Response-Suppress: All Auto-Submitted: auto-generated List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk The following bug has been logged on the website: Bug reference: 19760 Logged by: Alperen Keles Email address: alpkeles99@gmail.com PostgreSQL version: 18.6 Operating system: macOS 26 arm64 (also seen on Ubuntu 24.04 x86_64) Description: =20 CLUSTER (and REPACK on master) silently drops a live row when the same transaction inserted the row and then updated it inside a subtransaction that was rolled back. No error is raised; the row is gone after COMMIT. CREATE TABLE t1(c0 int, c1 int); CREATE INDEX t1_i0 ON t1 (c1); BEGIN; INSERT INTO t1 VALUES (1, 1); SAVEPOINT s1; UPDATE t1 SET c0 =3D 2; ROLLBACK TO s1; CLUSTER t1 USING t1_i0; SELECT count(*) FROM t1; -- 0, expected 1 COMMIT; SELECT count(*) FROM t1; -- 0, expected 1 Reproduced with default settings on 18.6 (REL_18_STABLE a85b5523e67), 14.24 and master 158b6d5109 (all --enable-cassert --enable-debug, macOS arm64); also found on master on Ubuntu x86_64. Rechecked on 2026-10-15 (Ubuntu 24.04, x86_64, gcc 13.3, --enable-cassert --enable-debug, server under ulimit -v 6 GB): the same on 19rc1 (REL_19_STABLE 0fb192f1b02), master aa7b9cf132b and REL_18_STABLE 4d62ef92fda. CLUSTER VERBOSE reports a negative "dead row versions cannot be removed yet" count (-1 here). Found with a query fuzzer.