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 1w4dxb-002OsT-33 for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Mar 2026 12:00:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w4dxa-00HQL0-1U for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Mar 2026 12:00:42 +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 1w4dxa-00HQKg-06 for pgsql-hackers@lists.postgresql.org; Mon, 23 Mar 2026 12:00:42 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w4dxW-00000000cSk-0XMJ for pgsql-hackers@lists.postgresql.org; Mon, 23 Mar 2026 12:00:41 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-486fc4725f0so34320135e9.1 for ; Mon, 23 Mar 2026 05:00:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1774267237; x=1774872037; darn=lists.postgresql.org; h=message-id:date:mime-version:comments:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=DhuwhhScTRXGXolL87zCv00kDF0gAAxAlsaQ8hwpWNI=; b=S8A713y4TsIHL++2HO3EoudDC7RUU3fhvzx8qMMNggCp0uyz9+Mpkb//3EdVU/kSOn D/Tta81v702i/3Q91iqc1djndG+msdoEJRu/YMsLSVcYiTUpmM7O5jdYIMjRZA/QB2l2 qmsdQ4lcuBQ+LCYL2O6ZagarBv8G9Tk9EdlOhBOKZA25PlzTy0tUxa7wqhK+Q1DW91bz GV9qq29XtF3UuZfMiae4kcuv1VoWEm/MWSl1yXbMiEuVELuADlmS55hABOx+Iu9XAdfA GDhUglDhiQxel8vrCJWf12A/Jt5Z66cfa8Ba6JkTBiKidZOaMlc7kYW0osrj7PuvgGiF xdgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774267237; x=1774872037; h=message-id:date: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=DhuwhhScTRXGXolL87zCv00kDF0gAAxAlsaQ8hwpWNI=; b=V6aeXkDOYfSgj6qBn53Job2ADecr5PM5pCJrzYWsOo+A23EgsyjQZ0UgiVcSv5U4x4 0iyo8lQSAqJh+OfTFfyT23prgP5oqbA/ymsF2Jugn6pSK2wWYnbabTGEsEZ72uISptq7 CBBkHoHL1KgL3Zi1xzl8gyk3LKpymYMPMGymBjZq952JU9mlD+DGH33ymTFXt1xfgYc6 in+r0lNJt9vHyofoKw86YSTpBMKdq/U1wUeYJwtmZokE2JpPUaYvgbRGIlU06LpmYaZE 55HJDIgR+90lrrZr6GV0suxQRizPi1HKvDH205Z6h20iRkksibFqNZ6gtxmBBEZW8QLu jv4w== X-Forwarded-Encrypted: i=1; AJvYcCWUTLR9bYeI7WXSSY1zN0ZvYDaauNYSgJIB48f+ruDorb6ZnkpRTYz4yhsoQg5wjCkcLv9utl7H9OCvdP4J@lists.postgresql.org X-Gm-Message-State: AOJu0YzRasx2/qWIst94I7yH78pDc1erd7OlGtwf2XjQZ6ZDA3xutlOO DNpyD4JdgJa4p7B+InePdElxFixFkkZ3hLCO7zZnjgolmzofj6pvyp+ajP2pbbL4Bao= X-Gm-Gg: ATEYQzwT6kZ0y0h4fzSbjRcXBbUCSxRYW6V8AkdXMGZRdLFdYR0DxbvfhyrEsuFZ6iZ TURQaRFs3eSK++i6xO7MBVUrYPTT+tfC/oG3CJI7HzclV9QBG4+xSi+x8nSBgKMMGyLrqDk2iwv CGBIa2PzLTx4ioor8BkTRCYvMtfpk9gfwlSCCgaqauddfV5FwpLI0gtnBT0MDu11wcLTKygeqYL icDQ7x3/VO8FNfd90fi3WOJbUzCUB4uNjvJA6dw5c5+6BEZs81psv4eU7WSBGLLjr497W0+h6RJ MiOMzLCmRwacWpfCFfQdEtAu1xQBl8JgHpsBky2l16XV1Gj95jVlVhIY1WDfSLoVM9zTnypZlbt HKRKdygEkOQ0KDV9Ma5NJZKJHEhUU4mJQ7mH8SbzChpJOwQFIzTUSLSVPH7y30OQzdg7er/E02z nt4QhkVHoDvwpLLB6dVwEkDGy9nfGVrMaiGKJptTJBIORq9bw= X-Received: by 2002:a05:600c:a408:b0:485:fbd2:f72 with SMTP id 5b1f17b1804b1-486fe8a2aa6mr131976715e9.1.1774267235673; Mon, 23 Mar 2026 05:00:35 -0700 (PDT) Received: from localhost (109-81-168-142.rct.o2.cz. [109.81.168.142]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43b647120a1sm29981570f8f.30.2026.03.23.05.00.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Mar 2026 05:00:35 -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: <29157.1774029970@localhost> References: <202602241757.6ac3iss2u4vo@alvherre.pgsql> <9116.1772009759@localhost> <100248.1772048475@localhost> <4200.1772781295@localhost> <29157.1774029970@localhost> Comments: In-reply-to Antonin Houska message dated "Fri, 20 Mar 2026 19:06:10 +0100." X-Mailer: MH-E 8.6+git; nmh 1.8; GNU Emacs 28.3 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Date: Mon, 23 Mar 2026 13:00:34 +0100 Message-ID: <46846.1774267234@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --=-=-= Content-Type: text/plain Antonin Houska wrote: > Antonin Houska wrote: > > > Antonin Houska wrote: > > > > > Srinath Reddy Sadipiralla wrote: > > > > > > > The concurrency test failed once. I tried to reproduce the below scenario > > > > but no luck,i think the reason the assert failure happened because > > > > after speculative insert there might be no spec CONFIRM or ABORT, thoughts? > > > > > > Perhaps, I'll try. I'm not sure the REPACK decoding worker does anthing > > > special regarding decoding. If you happen to see the problem again, please 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 insert can > > stay w/o CONFIRM / ABORT record. The only problem I could imagine is that > > 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 wouldn't > > be that rare.) > > I confirm that I was able to reproduce the crash using debugger and your more > 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 isolation > 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 the > next step. I could not resist digging in it deeper :-) Attached is a test that reproduces the crash - it includes the isolation tester enhancement that I posted separately [1]. It crashes reliably with v43 [2] if your fix v43-0005 is omitted. [1] https://www.postgresql.org/message-id/4703.1774250534%40localhost [2] https://www.postgresql.org/message-id/202603191855.fzsgsnyzfvpt%40alvherre.pgsql -- Antonin Houska Web: https://www.cybertec-postgresql.com --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=nocfbot-Reproduce-filtering-issue.patch