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 1vkuxR-004Iqn-0S for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Jan 2026 02:07:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vkuxQ-00GdYS-0m for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Jan 2026 02:07:00 +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 1vkuxP-00GdYK-2t for pgsql-hackers@lists.postgresql.org; Wed, 28 Jan 2026 02:07:00 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vkuxN-00000000nsR-1vhO for pgsql-hackers@lists.postgresql.org; Wed, 28 Jan 2026 02:06:59 +0000 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-59dea72099eso5366774e87.0 for ; Tue, 27 Jan 2026 18:06:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1769566016; cv=none; d=google.com; s=arc-20240605; b=fmNx9MshQh3J8F9jcLvpbsOPfNxpZHfhF8VdmJm2Wywq9tF3AkkzzgyuIWuosfh+nK LpZNxsJo2Dze6FCtxOF1A/aglDrY39o0KRjV6RTynreVgDgxX7wJdzPfgOk5SpbfVmpo qPjJi+/0u/k0BNniUDbLX8Rzn2P9hFx0gRnXw6jAZ3vtGCRcxWVgG8lbTXpP9ntbjsFh b6zd/RhoPs9gyhNmvNjm6qvldWUI289GTbejYN5tI4R5Fthww+3WwcR9H2ORIvyBS/FE vnzMqC4cMHkpG9BbwAE5z9oEpI/KlfNpLRdGyC8j0tqeHEGFdKaOCHE5InO7ACjhZQcX RTxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=Hs/ZMuFEJoHpehWdDxQSR87tJzzM1n6qwnD9HZYNdSE=; fh=Z3IkAxZ52CmJmU6m/EKU801jQwLGovj+FPxZMG5QzSg=; b=X3k/A9Dpnj5xdqF4lfUwOr4XCzo7/Zww4/1PYYi+NxEXixyf+QzcxPWdQQ0XVGD/g2 YrY9WCuM2FTAzEnjXy/ghL09qaGK0gofezfrgloAKQ6kIeqvbYUdpBixWS1gqSZp8Ap+ 4kvyx11kR62aKElyp/U2MrgZbjQe+CtUAxIFFVpR6Dfk4nNYBu/VNPU3mc7OUOcb369U 78IcrP8BFkMrqyH0tve/bZ45856U+xN8Yhi7+QZrte1Pl/zSGYor+NZ3rS0IontfHq1J 6RZuecobKNCDHT5vDFF9M6BeEDKZsd6Jzv13OcETYAFfsrv9dShVo8DvezMS7Twl4xrq Xgaw==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769566016; x=1770170816; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Hs/ZMuFEJoHpehWdDxQSR87tJzzM1n6qwnD9HZYNdSE=; b=iAPsAr/qrmL1GynbOvrf5U55CumjeESxgk6yGXJxjdz5iGE6480pWWiYbVbQr8Rpe0 xq4Ns9XUF5J2IWCZxhb08f/mSZKI0RUrfnuLx8tpp1VUwRWbD7tl/Xy5AgLTEWmDQrlP VyVlb1ZqRxfoPQ7qck2xpBWL1mFRUYO4g0MwSL4PB4QORQ1knuCHCVwwYQrQNRPf+VOc hFXCmEtaClpVhbU0uGKHyKrjfiCy7/o5H56urTWoQVbMRu8r+fSm8saW1P+3V/qRybNu yuGAZdhW4abTkSlJo844LfUE2hYDXuriwEYCByMv1rwCs8rGnEdorh56jTCCLU9O9TWB DFGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769566016; x=1770170816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Hs/ZMuFEJoHpehWdDxQSR87tJzzM1n6qwnD9HZYNdSE=; b=hoAN39Eks9sCR3toDishLKuv9tcJBtBW4xBmOpFPmPt8cv3oRx9TqqmjWeMDSXg98N Tc/IloYP0udvPcOunJBKaRr6D2PyJghVU/5LAGEC7kSAwwKl1Ur9A7o6djKGCuBxyyen rhZfgofG+twiANe/LIJGVQjBAsE/T2SbuIDNOwKLXzlSzd3v+WHhWWB8refHtoht08JU ht3zawsof8Gc97Db6MYwu1ssIUT3pXtL5CSr1XK7yfG1V6fjkiPCUb0EJDJE8kK9679s 8LqNxW1uq7RS1vCjPi7ZCaKEZ9gwAMsWX3QxoWTUS1LvrdOPhGetH9Jb4glBtzpY9/dB 2n6w== X-Forwarded-Encrypted: i=1; AJvYcCUU9FFHJT6hdxVLzCrIQ+R2qonDhgIH8ewSlOCkFBrFEFEexuJNx+Mjw2RK+V8PP5Y7NgRGdIiYli+B3rhX@lists.postgresql.org X-Gm-Message-State: AOJu0YygFhnm3aSoRb//Z9eAdn7l8GzYCXOgTuNWWnkJ+qwnBtnu0PYo AOalkiBFAuegfU0madz+I0LVdhc3htASeMZr7GlPnZVll+fZsbifPEUYznFjLlPUPpng3HH40L/ g5cS/Ou12lm2kSzLjZnfv3naa4H6anTslf19gJFs= X-Gm-Gg: AZuq6aLIJ6Y0v1k8UG2zaCwVFJm1Ppbbxknc1wMzmt4YTiSZD8HVAXZpTkbXu5ZkpAh rZKX83qobgQLhap7G5agSRSaXdbRN0b1xcmjh/siYWz6MvS2zST4Ft84brKYINmA5uZgQpsLZhp THBGlBN1JUuQHw4FpoZdxSslGDUQFWU0r2+JzrarprAw+o6ninRipSIcYGru9esJF6iN9ikN7Ta t/4tyCkxSS46WpUiaF4fznqR/PJZVR5WL/j08J1/ZMU2Tc+Dtqa8FnQEEjCjtyXjOcucmPe7Uzk kG1SO+U1i4F17vaoRnUPUzXUIjoIZiJNYzXLecIH1P1peE9SC6obVjAW X-Received: by 2002:a05:6512:3185:b0:59d:d22b:8d30 with SMTP id 2adb3069b0e04-59e04025931mr1605765e87.33.1769566015917; Tue, 27 Jan 2026 18:06:55 -0800 (PST) MIME-Version: 1.0 References: <202512151349.vlq3mpfniyk3@alvherre.pgsql> <11247.1767609087@localhost> <11558.1767609632@localhost> <141054.1767891540@localhost> <137668.1768235610@localhost> <74802.1769071060@localhost> <3901.1769412880@localhost> <88003.1769511456@localhost> In-Reply-To: <88003.1769511456@localhost> From: Mihail Nikalayeu Date: Wed, 28 Jan 2026 03:06:00 +0100 X-Gm-Features: AZwV_Qjm4a2RRUG690ZgEHuEdmL22jdzTCqxAwlCO_qKkaeYaK5tGWaw54xBhzE Message-ID: Subject: Re: Adding REPACK [concurrently] To: Antonin Houska Cc: Alvaro Herrera , Pg Hackers , Robert Treat Content-Type: multipart/alternative; boundary="000000000000c91245064969315b" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000c91245064969315b Content-Type: text/plain; charset="UTF-8" Hello! > PROC_IN_VACUUM shouldn't be used for the same reason StartupDecodingContext() > avoids setting PROC_IN_LOGICAL_DECODING in transaction. I've removed that and > the tests work for me. Especially the "cache lookup failed" error is almost > certainly related. Please let me know if you still get the other errors Yes, now it is passing. > (Except for 2, which is probably due to the MVCC-unsafe behavior, as discussed > earlier.) Not happening too. BTW, it was non MVCC-related, because in that case relcheckxmin would catch it. What if: 1) add new PROC_IN_REPACK flag 2) use it in catalog horizon, but not in data (like was done in [0] for PROC_IN_SAFE_IC) And after we have options: 3) do not "table_close(NewHeap, NoLock);" - keep ShareUpdateExclusiveLock all the time to prevent VACUUM enter 4) do not heap_page_prune_opt in repack transaction (just using simple flag) Or 3) preserve xmin/xmax of original transaction in repacked data 4) but better to keep ShareUpdateExclusiveLock anyway Seems to be enough. > The 0006 part needs more work (definitely beyond PG 19). This is sad, because if you are in a situation then you need REPACK - pinning the horizon for too long may just finish your DB.... And also, even with 0006 we still need to build indexes, which might pin it for long (even duration caused by a single index). Mikhail. [0]: https://github.com/postgres/postgres/commit/d9d076222f5b94a85e0e318339cfc44b8f26022d --000000000000c91245064969315b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello!

> PROC_IN_VACUUM s= houldn't be used for the same reason StartupDecodingContext()
>= =C2=A0 avoids setting PROC_IN_LOGICAL_DECODING in transaction. I've rem= oved that and
>=C2=A0 the tests work for me. Especially the "cac= he lookup failed" error is almost
>=C2=A0 certainly related. Ple= ase let me know if you still get the other errors

<= div>Yes, now it is passing.

>=C2=A0 (Except for= 2, which is probably due to the MVCC-unsafe behavior, as discussed
>= =C2=A0 earlier.)

Not happening too. BTW, it was no= n MVCC-related, because in that case relcheckxmin would catch it.

What if:

1) add new PROC_IN_REPACK= flag
2) use it in catalog horizon, but not in data (like was don= e in [0] for PROC_IN_SAFE_IC)

And after we have op= tions:
=C2=A0 =C2=A0 3) do not "table_close(NewHeap, NoLock)= ;" - keep=C2=A0ShareUpdateExclusiveLock all the time to prevent VACUUM= enter
=C2=A0 =C2=A0 4) do not heap_page_prune_opt in repack tran= saction (just using simple flag)
Or
=C2=A0 =C2=A0 3) pr= eserve xmin/xmax of original transaction in repacked data
=C2=A0 = =C2=A0 4) but better to keep ShareUpdateExclusiveLock anyway

=
Seems to be enough.

> The 0006 part = needs more work (definitely beyond PG 19).

This is= sad, because if you are in a situation then you need REPACK - pinning the = horizon for too long may just finish your DB....
And also, even= =C2=A0with 0006 we still need to build indexes,=C2=A0which might pin it for= long (even duration caused by a single index).

Mi= khail.

--000000000000c91245064969315b--