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 1w2xAi-000lHl-1r for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Mar 2026 20:07:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w2xAg-00E1iw-1Y for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Mar 2026 20:07:14 +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 1w2xAg-00E1io-0X for pgsql-hackers@lists.postgresql.org; Wed, 18 Mar 2026 20:07:14 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w2xAd-00000000zpJ-0Vnq for pgsql-hackers@lists.postgresql.org; Wed, 18 Mar 2026 20:07:13 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4856cd3f1ffso2382015e9.3 for ; Wed, 18 Mar 2026 13:07:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1773864430; x=1774469230; 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=1ZXdCh3+rOd4IoWV4EjAKXCZnNptW1vopQL1Q0MQ/Zc=; b=iBtUz/qA0nQ0Tvs+EyqbfWSh6AoZ0oumOMXyRlDwZUDaLJc8eDAX9hPSJI6ZYNuMOZ jwMG/G20mF4T8kLMVTGKqf4f2qfqKkAeH1yfA4zl4TMPnak9AWN7A7g7g/JOxWIavx2V eYBU/w+YyHedLAukl7PjXBXCDKMyf3SALztI6yBuj0XL8P9LTC4GXuh9m3DK27PHPVFr 4cDB8/nK9bhfQXC0juP6Njq4Ogw6m3CO13x19jbba+HKZfkRskfRx2IWpxG60eTe0Uvu elphj8HjKlsG7WZkvnrazm4qDloh0yUOJkDbrsIoRWOM1/VgGE22PLTKvi4ilpAL9xRr 220g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773864430; x=1774469230; 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=1ZXdCh3+rOd4IoWV4EjAKXCZnNptW1vopQL1Q0MQ/Zc=; b=crocpg8W9yh5i0dVdzwX7EzAvrm8XNl4eTPcFLCkZac7h3UAvm/O+mUIiDKP6xkksa YefLpGd79ngIGYBBEvZrLLRZcxkb2n5ao6MN4cdIqb1gktvs4qxmDHonABfXhrmgVBri gm+LPmK0ijlGupzyK0eM6/qqAMGVHMxx333plfiawx742RevwdgOH7Oa+4cImnyN8kvQ ByslDAzMaO2guWqQVYpda6bo+lSwi8h6glyb0uXZMehuseur+BUSbFBgao75Zx+B6Pp8 5XxKVVfKFR2Xf28ISZfXnukvZAfGQVTg4pmTC5SXComaBO/zFV1mnIgV3CD4qpnRfwzJ auRw== X-Forwarded-Encrypted: i=1; AJvYcCW/sKrWPUnMnHFxEOEvImlkSV3b31sqVMy0qMgDEZ+z7fgKArdf00TBCsTP9nOxmSa++KLwKFz2mwie1EBy@lists.postgresql.org X-Gm-Message-State: AOJu0YxQ3xFoMrkPqA23WZrZgFFMqNC2mnmJt4mFEloIctS9ps7wobVT rJC1Lo54P68Q098N8fXJwjkclt350iZEHQl6cLF0XcjlPeKR+32CPVMJ6r1S6Sd28Y0= X-Gm-Gg: ATEYQzyufFQI/i6CL3OAo+LkWgZ8xKJM2tzg27yuxLvBGj5Up7qFFn9oA7mj+NxVhFk PmOmUXYqPOxWGsIlyCtN+QU+fuhBxhWbsCNgJDqlcJTQNoWhkLdo2C8lG9ijDAS//INbgc+Tp/f 0qFXJ2LXP1aMkmgzcht3F8oxe3+G32BYYdKhgY+ukJ8bdLIjNeZi+QU9CVXncryPV8E3CVZWy+q LDDSYZwTnM4uG5+SwsIgGSGiItFmggngiAGaQ9kEC6uz6bruOIlmKo6Z1gWVqBPkWiTvn1iA2oY g33onHySdoVv/9VUmaEpUucdZ/QQPdO0PB81Oi8TlzfEUvp6EcyjS4XEuZl9TwMZiqppoWFpoXd XVZTpcJXYLeuOXJFXyuNS/Rd7yyEdA788VkeItx5Gu5AOqCRQ5pPLZuro/MAaPpUpfJj+GuQ457 7LZZzTx+Msg2rSlriVqKiOZpVexJjiQlET/+KF X-Received: by 2002:a05:600c:1f13:b0:485:4371:539a with SMTP id 5b1f17b1804b1-486f446f4f7mr79597275e9.31.1773864430146; Wed, 18 Mar 2026 13:07:10 -0700 (PDT) Received: from localhost (109-81-168-142.rct.o2.cz. [109.81.168.142]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-486f8ba4baesm20499845e9.13.2026.03.18.13.07.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Mar 2026 13:07:09 -0700 (PDT) From: Antonin Houska To: Srinath Reddy Sadipiralla cc: Alvaro Herrera , Matthias van de Meent , Mihail Nikalayeu , Pg Hackers , Robert Treat Subject: Re: Adding REPACK [concurrently] In-reply-to: References: <202603162202.l2sibdzviih7@alvherre.pgsql> <9548.1773744820@localhost> <91049.1773777426@localhost> Comments: In-reply-to Srinath Reddy Sadipiralla message dated "Thu, 19 Mar 2026 00:42:19 +0530." 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: <98416.1773864429.1@localhost> Content-Transfer-Encoding: quoted-printable Date: Wed, 18 Mar 2026 21:07:09 +0100 Message-ID: <98417.1773864429@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Srinath Reddy Sadipiralla wrote: > TRAP: failed Assert("RelationGetRelid(relation) =3D=3D ((RepackDecodingS= tate *) ctx->output_writer_private)->relid"), File: "pgoutput_repack.c", > Line: 97, PID: 397007 > This crash happens if we run REPACK (concurrently) on a table while a he= avy > pgbench workload is concurrently executing multi-table(setup.sql) transa= ctions(dual_chaos.sql). > It triggers after a few back to back REPACK (concurrently) runs. > = > i think i found the cause for this crash , because there were some chang= es which > slipped under the nose of the change_useless_for_repack filter , which l= ed some > changes which are not related to the relation which we are currently doi= ng REPACK (concurrently) > got decoded and added into the reorderbuffer queue, the reason for this = is repacked_rel_locator.relNumber > is by default set to InvalidOid, this is actually set to the target rela= tion during setup_logical_decoding > but this done after DecodingContextFindStartpoint, in DecodingContextFin= dStartpoint changes are not > filtered even if its not related to the target relation , because rm_dec= ode->change_useless_for_repack->am_decoding_for_repack > where repacked_rel_locator.relNumber is still InvalidOid, which makes it= skip the filtering even its not the target relation, > this makes it to be added to reorder buffer queue, so during the process= ing of reorder buffer plugin_change is called > where assert fails, i have attached a diff patch to solve this. Thanks a lot! Yes, your explanation makes sense. I'll include the fix in t= he next version. I think it might also explain the other crash [1] you report= ed earlier. I'll try to reproduce that. [1] https://www.postgresql.org/message-id/CAFC%2Bb6o2yzA80YmfEhmMO9puN8qvG= Rvr-15BBLn3UmJxPfpr2w%40mail.gmail.com -- = Antonin Houska Web: https://www.cybertec-postgresql.com