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 1w3eEo-001QIy-2x for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Mar 2026 18:06:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w3eEm-007fJk-0B for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Mar 2026 18:06:20 +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 1w3eEl-007fJc-2O for pgsql-hackers@lists.postgresql.org; Fri, 20 Mar 2026 18:06:20 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w3eEj-00000000DgV-1uer for pgsql-hackers@lists.postgresql.org; Fri, 20 Mar 2026 18:06:19 +0000 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-439b9b1900bso692900f8f.1 for ; Fri, 20 Mar 2026 11:06:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1774029971; x=1774634771; darn=lists.postgresql.org; h=message-id:date:content-transfer-encoding:content-id:mime-version :comments:references:in-reply-to:subject:cc:to:from:from:to:cc :subject:date:message-id:reply-to; bh=7URS6g/2ArczVL6G0dRFo0N3zHhpn9xtXgeSmr8e9fA=; b=CpY32HmT4YUeJFQ5zNZQqaFD3Nh/V8O7SSC+IqdwD+Oim8IzChGZIsbipxxRWg3rut pCErSt0DGZbYFJ8QX64cFhe02IT3icSzfWZ6BCYe+KJkgOf+2WVvSWU327KVARgrBUsZ 1hPBuasqFmGLnjra9UB4AWAHRVx6rmAs1jibbi3JxRKtxfhwkQmu0ITUaZ1lDEYccebx qU+LDJh9Om9dJ3JaUf1wZaJZ7xQFgyCbqa1+0kVjlgcH8ht0JH4UZXhdmEH2KNj13Cso 9qCQwOAZGSUsJYf588mT2KQp9jIiZhHjVq9TbH/9SYDrqHJZQTyGaXlhR7TNuoGzDqhK Zn+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774029971; x=1774634771; h=message-id:date:content-transfer-encoding:content-id:mime-version :comments:references:in-reply-to:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7URS6g/2ArczVL6G0dRFo0N3zHhpn9xtXgeSmr8e9fA=; b=CHMn9SMKFHpKIjoJcWeaSsynlrlFvqmCR6uAY0pbOAJBzCGvJOITVri/b3HjFCPcsj Ou7UL+7ZXrDc4BjNV6brMK9KUFKUOFOc0vL+6Ec/XUMIMyh/j4GWqpO8hfZ3l457p7Dj xU+DJVwSLnVnLKf4EB2IRqc5Y/dmszsULSPnNp+bz3zjbG25PGDaKpq4c7E7/nYfwkpn c5D44Ag/gSlxYGIOob4caizxWKjl+BCz39x2vUHsTE5l7l5PEqBaPRsm9iO+iWZl6Imc +SQlcrfOwMJD39xKQef0ML1DWRe6lEAVq3ltN1JVEOwWELaGiK/YDXXW9A2r3QYIOLL2 cg6w== X-Forwarded-Encrypted: i=1; AJvYcCXvtQ9qu7lcpPuf4z4JISWpJcWBqEOgiMzvSXFcMJsTkCfbluYOloJxlizo3J4bHj+zUuGVMtrfUpuh0WGU@lists.postgresql.org X-Gm-Message-State: AOJu0Yx7wWPaBcaSJEtiFVKca4dBAF1A34DfoBoFNr0/jWaE1vqqP2Cu jzL2we3UoGU9/4vlN1OSZSWmnfepgXv2Gb3O/TYwGOYJsmafO/JmWLxvvJjUpWnPFQ4= X-Gm-Gg: ATEYQzyQsbpnX02+t0uWGRSHkvSvTnycRckCIVzHGOp5PIeceZvzhb0KCFEU7tDBXIF yuyyLTpShC1vpoWJRCM8ADlAWoi5sByuJd2nGSxHle3yJGImQh6L94nIkVq+bIH9IbgSwJRjyya o3jM/gFIjKFtXEeNGT/5r8NPzCPZbRZgnzv4Vr4gWeUSxjsypRLq9UJvqNOoqNrN9WMo9c+aYEX WUGYkSZn610t8jM+lYy0oZ7ezbXyeL+NfoOFfO8JDRamhiB1UCcQIV5P4Gc3No+9xGoOZtg0nii T366P55Yl8AuorC/54BX2z7liC39lzwWIHlPZxsXNMNcy7z9ak2CxM0uNvEWMfRYTPHp8Y0OHOS 5ZoeQC+532klaQGotIlCr1/1idVLG6kzkM+oylMPBI8tpiXo8DTahjr2AYLiK8CHgRN9SN07NRp mRhfPZ4QKTukGo1gDAEXkYmmaCWj68rVv3XE98Eq8TKGycOoQ= X-Received: by 2002:a05:6000:2912:b0:43b:45d1:f448 with SMTP id ffacd0b85a97d-43b64244c54mr6972515f8f.14.1774029971300; Fri, 20 Mar 2026 11:06:11 -0700 (PDT) Received: from localhost (109-81-168-142.rct.o2.cz. [109.81.168.142]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43b644acb52sm8849063f8f.7.2026.03.20.11.06.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Mar 2026 11:06:10 -0700 (PDT) From: Antonin Houska To: Srinath Reddy Sadipiralla Cc: alvherre@alvh.no-ip.org, Mihail Nikalayeu , Pg Hackers , Robert Treat Subject: Re: Adding REPACK [concurrently] In-reply-to: <4200.1772781295@localhost> References: <202602241757.6ac3iss2u4vo@alvherre.pgsql> <9116.1772009759@localhost> <100248.1772048475@localhost> <4200.1772781295@localhost> Comments: In-reply-to Antonin Houska message dated "Fri, 06 Mar 2026 08:14:55 +0100." X-Mailer: MH-E 8.6+git; nmh 1.8; GNU Emacs 28.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <29156.1774029970.1@localhost> Content-Transfer-Encoding: quoted-printable Date: Fri, 20 Mar 2026 19:06:10 +0100 Message-ID: <29157.1774029970@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Antonin Houska wrote: > Antonin Houska wrote: > = > > Srinath Reddy Sadipiralla wrote: > > = > > > The concurrency test failed once. I tried to reproduce the below sce= nario > > > but no luck,i think the reason the assert failure happened because > > > after speculative insert there might be no spec CONFIRM or ABORT, th= oughts? > > = > > Perhaps, I'll try. I'm not sure the REPACK decoding worker does anthin= g > > special regarding decoding. If you happen to see the problem again, pl= ease try > > to preserve the related WAL segments - if this is a bug in PG executor= , > > pg_waldump might reveal that. > = > I could not reproduce the failure, and have no idea how speculative inse= rt can > stay w/o CONFIRM / ABORT record. The only problem I could imagine is tha= t > change_useless_for_repack() filters out the CONFIRM / ABORT record > accidentally, but neither code review nor debugger proves that > theory. (Actually if this was the problem, the test failure probably wou= ldn't > be that rare.) I confirm that I was able to reproduce the crash using debugger and your m= ore recent diagnosis [1]. Indeed, filtering was the problem. Unfortunately, I wasn't able to make the crash easily reproducible using isolation tester. The problem is that the logical decoding is performed by= a background worker, and when the backend executing REPACK waits for the background worker, which in turn waits on an injection point, the isolatio= n tester does not recognize that it's effectively the backend who is waiting= on the injection point. Therefore the isolation tester does not proceed to th= e next step. Anyway, thanks again for your testing! [1] https://www.postgresql.org/message-id/CAFC%2Bb6qk3-DQTi43QMqvVLP%2Bsud= PV4vsLQm5iHfcCeObrNaVyA%40mail.gmail.com -- = Antonin Houska Web: https://www.cybertec-postgresql.com