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 1vmqoD-00Gzqd-2e for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Feb 2026 10:05:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vmqoB-00DO02-24 for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Feb 2026 10:05:28 +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 1vmqoB-00DNzu-11 for pgsql-hackers@lists.postgresql.org; Mon, 02 Feb 2026 10:05:28 +0000 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vmqo9-00000000ehw-2pQP for pgsql-hackers@lists.postgresql.org; Mon, 02 Feb 2026 10:05:27 +0000 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-59b6d5bd575so4154685e87.1 for ; Mon, 02 Feb 2026 02:05:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1770026724; cv=none; d=google.com; s=arc-20240605; b=GkN1QLVTCCyntUXSVRdjGQO3k85H1tDFR0Ri5O2xQ5DpnG31BYyPnRuczHoaQQbu3B PERfWuCyHtyUKLHxL0VRCP9KQXaNp7vkUfQEe03YQHnbmKvJFp9ivnfPuI+1+egqihhg cgIT/haHPajBx2WqUskA0PBwyu2ZEQximXXeuq8Pk3wKQMXPLPoHS2/sVNUvaej3XKqR 1/jocelbjcsdZhtAYgS99ddhB+p0RGzEYKXfrfCiEqHclhGa+5qyVv8HEc/jpt89AHvh qF3yzRj5C7HFc05aITJP5AeB1ZYaJzuOtWRBdqLOS5f/Qb0rjUpxYHwYoRsDm4gKbw1O 8Puw== 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=qDyFo/fGmC4ygQ5JUt5kbJmyjXdW3T4DcCZ80ntXmew=; fh=oyg+P0Yn2vNNwavAh2NY5qxdhpC3uv7Mq1EVS1GrTjg=; b=YgfINuQl63mFLPR0cMdNXK2MHc8qhHOK7Hl8J8ie0wlcL8iZUjW4TLYAraWEMTmvFV S2kLRwALNsSNL0kO6FPrtCa+KkKzk043ZQdFzpxw0Qz7otXCHf4xgrf/6ZoyCZY8ZPv3 tYxBJyutiPWdfQvIv80cl1VkHO7r8fRcS6ccMbQiQ62jgIK5PEUyZSZhsV1oQq0mYLn0 Qp6wn28UYnQTAIEEoZI8YHV/53sr/my1QFV5MicQxs48lHeYE7IjUn0gvoZrN2lCxX0j ViiEqCKV/WF3DpzVYlScKrm99cE2vti5HtbPdTW46K7yOKF2gbA5Eq967QUa0cz9RR/1 4VFA==; 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=1770026724; x=1770631524; 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=qDyFo/fGmC4ygQ5JUt5kbJmyjXdW3T4DcCZ80ntXmew=; b=m8fWEeBbjodL3fhNkbd4ZX2J3TXZvi3pTQobqSaTag6cdQAxHw4e4iyNE0yz64TVCc RfJpjcAvUK8pnILIx6qGGs4cw6OLLRWFzavAaxBCL19dYePyVOb7+OicKzCRfEeM8ZK1 9EjVnCz0IU2KhrT++hYaiwaRnB9bes+4dteCgzv4N7UJMsDjAVXY6AFO2NwSyVDiKeW/ pi1kA4U5D75TfBFsjTs+cc8qW/3g/KpwvDS08LCaE8yxRV+JpX1n9QAs+VBFc1X1Mwhs XhVyp8RjYWyNjTUpx2UBTx7G/kjLOLI/Zt5Whozz/pcVdBDxRl6yZ/vsJzgFXfp5UR7c QDnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770026724; x=1770631524; 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=qDyFo/fGmC4ygQ5JUt5kbJmyjXdW3T4DcCZ80ntXmew=; b=jGXw69T6Kc5JyLshYMtjz644hGQ/gyNhWf5qG7vrDziKm/s6RWsSLsXBrF3TFpoL4i 71NX/g9CCdxkMd82pWmYYbtz/t1Jyn7kbVe1cb1+bZAl9RYUSmDeHsAUsjHnCuivNUpc SGasQxGx2go2uqvU6vOTk/R1xxhqgab42NrqIDt84SUNkS19n627jUgO/tIjQ+X2bIK5 R5Z26hXZ9ArlY8Nj4LJorlG7H75ySy0XigYUKQ4HTZF0BaA+GWNK4GOqUfbSs00/HYFB algtQKHAnUSSN0etevUPYgCNY2N9AxYD0//xzuYVvOQWvQq7bY3kg5lXld/E0PpjEQQW jPVA== X-Forwarded-Encrypted: i=1; AJvYcCVZHfNwYyl+wzcSoDFTJWwy82Kz/smoB1uoa/2uoc7Q+dgKiINE0Or6SS6ktI7ufc0PvtIDRiBkv4ne3s1R@lists.postgresql.org X-Gm-Message-State: AOJu0Yx0UFyPxI4t4wkfdv+B1cF3BWU8HiobDUvNUuAluwQmhoT6Cksb WLjGRJEfUcY6OkSsjGbNlJCl5vAmO69TSOcEqWMe6hrnJniZJnubPSEkGbWUY5Koa1UdHmzqrIO 3MsBTWMG6KD6e0fGb/LdViqq1ngMTJRM= X-Gm-Gg: AZuq6aKPOpGiRNykBOLw3IFTIhGsqqYBtwAvuR0MP9yhrEeCPDrNF9mXAnm4pVTo/QQ iBdiZ+/DFb+5vuexgwo9QnmAcatbNW5Ff6IbaOZJ+XGZ/JwlMl2xPLE2DENMkG2f+HGkHJTKUjZ WNy1sFA4AQ1xjmtcOZFwvueyEZVuc7TRIQ2Jr/NODNLXQyFWFxcrNLArAieCCic7UWV3ZAjeAbe azTqqyuFHNKxmNAuzaj+14H7wFu/b3bK6gXkv1B0tNQAX0pqYe0LHGFCrfbNM6BU5EAFYko06ju 38GGloWREZ3TWfMr2SpGNpWQuttx2656v9kE7K58PhusghLmnM1C2Du5hmTugcbXxGhVylVVT0Y MrNcK/dEIo0zP05gb7wO4viOomw== X-Received: by 2002:a05:6512:b99:b0:59d:d342:88af with SMTP id 2adb3069b0e04-59e1640536dmr4593571e87.16.1770026724153; Mon, 02 Feb 2026 02:05:24 -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> <57210.1769801636@localhost> <8029.1770024929@localhost> In-Reply-To: <8029.1770024929@localhost> From: Mihail Nikalayeu Date: Mon, 2 Feb 2026 11:04:45 +0100 X-Gm-Features: AZwV_Qgp5b6uDd6Nce_xkg1VQRvZXj0yN-Gy-XkpQAQY0MC7PLRYn1q-j3Nz97E Message-ID: Subject: Re: Adding REPACK [concurrently] To: Antonin Houska Cc: Alvaro Herrera , Pg Hackers , Robert Treat Content-Type: multipart/alternative; boundary="00000000000022ddbc0649d476e4" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000022ddbc0649d476e4 Content-Type: text/plain; charset="UTF-8" Hello! > I think it *is* related. My earlier patch version, which used the > PROC_IN_VACUUM flag improperly [1] was also causing visibility issues. Please > let me know if you manage to reproduce the issue with v32. Will try. Just to highlight - first error happened on v31 *without* PROC_IN_REPACK. Second error had PROC_IN_REPACK code, but it wasn't executed (flag wasn't set) - that's why I think it is not related. > I'm confused by hearing a complaint about complexity of code that I haven't > posted yet. And I don't understand the relationship to "replication logic": > REPACK (CONCURRENTLY) tries to avoid decoding of data changes in the *new* > (transient) relation anyway. I am not about complexity of code, but more about complexity of approach (introducing new things like cache-only relations). "Replication logic" - is about the fact you mentioned that such a relation is going to be replicated to standby (as result, some replication-related code is affected too, probably standby promotion also). Compared to the PROC_IN_REPACK flag - it feels overly complicated for me. PROC_IN_REPACK is the simplest thing here - just exclude XID from data-horizon, but keep it in catalog. That's all. Also, maybe I sound a little bit rude, sorry, it is just because of the language barrier. > 3) XID assigned early due to creation of catalog entries for the new table - > that XID prevents the VACUUM xmin horizon from advancing till the end of the > transaction, i.e. till the end of REPACK execution. Yes, but PROC_IN_REPACK covers it as well. That xid only in the catalog horizon. > IMO it's better for users to see the correct data than ERROR. But it still > needs work. Agreed, for me it is ordered like this (from bad to good): 1) silently see incorrect data in rear race 2) receive error instead in that race <----- acceptable for me 3) no error, data is correct Best regards, Mikhail. --00000000000022ddbc0649d476e4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello!


> I= think it *is* related. My earlier patch version, which used the
> PR= OC_IN_VACUUM flag improperly [1] was also causing visibility issues.=C2=A0 = Please
> let me know if you manage to reproduce the issue with v32.

Will try. Just to highlight - first error happened = on v31 *without* PROC_IN_REPACK.
Second error had=C2=A0PROC_IN_RE= PACK code, but it wasn't executed (flag wasn't set) - that's wh= y I think it is not related.

> I'm confused= by hearing a complaint about complexity of code that I haven't
>= posted yet. And I don't understand the relationship to "replicati= on logic":
> REPACK (CONCURRENTLY) tries to avoid decoding of da= ta changes in the *new*
> (transient) relation anyway.

=
I am not about complexity of code, but more about complexity of = approach (introducing new things like cache-only relations).
&quo= t;Replication logic" - is about the fact you mentioned that such a rel= ation is going to be replicated to standby (as result, some replication-rel= ated code is affected too, probably standby promotion also).

=
Compared to the PROC_IN_REPACK flag - it feels overly complicate= d for me.
PROC_IN_REPACK is the simplest thing here - just exclud= e XID from data-horizon, but keep it in catalog. That's all.
=
Also, maybe I sound a little bit rude, sorry, it is just bec= ause of the language barrier.

> 3) XID assigned= early due to creation of catalog entries for the new table -
> that = XID prevents the VACUUM xmin horizon from advancing till the end of the
= > transaction, i.e. till the end of REPACK execution.

Yes, but=C2=A0PROC_IN_REPACK covers it as well. That xid only in the= catalog horizon.

> IMO it's better for use= rs to see the correct data than ERROR. But it still
> needs work.
Agreed, for me it is ordered like this (from bad to good):

1) silently see incorrect data in rear race
2) re= ceive error instead in that race=C2=A0 =C2=A0 <----- acceptable for me
3) no error, data is correct

Best regards= ,
Mikhail.

--00000000000022ddbc0649d476e4--