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 1w8why-0012UK-2k for pgsql-hackers@arkaria.postgresql.org; Sat, 04 Apr 2026 08:50:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w8whx-00FkOD-0M for pgsql-hackers@arkaria.postgresql.org; Sat, 04 Apr 2026 08:50:21 +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 1w8whw-00FkO4-2X for pgsql-hackers@lists.postgresql.org; Sat, 04 Apr 2026 08:50:21 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w8whu-00000000WuY-2MSa for pgsql-hackers@lists.postgresql.org; Sat, 04 Apr 2026 08:50:20 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-48374014a77so32430525e9.3 for ; Sat, 04 Apr 2026 01:50:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1775292616; x=1775897416; 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=Gha2+SvSirvx9fRh7+nRTcd9KNDRWV8coG/j0G2UwzI=; b=O95nDQxj7jjaAW99TcjuF0vhyTMT+m8vTPIBE3CjL6FujN4OXP8q3S6lAt69ZrR3GE 5WknZc5qrgVkIzXXtnpDk1DDVGqXANa9Zg6vHUGrONmM28vDG+Xp+54UvLU9cQe0Do2T EMxE76cZATwWortsUyBcRqTvJx/KlUjOctDs7ojiSWpRaBByCnNRrtwkuz/0ddIx+DKX o8u5XiR9NLpjyNfb7/7OtDDCtCvbEtQqeUoRgsiTrtjC65KG2qlZqLY8SWp+r1d1Du9c 6cehoPYym8YdviVwDGq4qlVcj3BQENYh9Fc6SyE8+yl2b0q13iAjtcLfWDojnTnYjKpz hYCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775292616; x=1775897416; 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=Gha2+SvSirvx9fRh7+nRTcd9KNDRWV8coG/j0G2UwzI=; b=XCIzLWgAuGMYyRw6aCAhbUq6kpJnR43rztknJ1zSRra2acBxcibJQU/+sFmXK2Ugd1 E5OnH9zUVbdYTGT0xCwYU4qY+mqJ6d5113K0lI3ihM4zgXS1Xgnvp/m7nOQhfF2Cn0+i f8eJsvvUosBSiXHb1mwd2ptq7FU+RbuYjGuEU3CZCdb0rGysLgyJYQwWdBQLDQIzH6tQ XM/sLrkajYirduF/oGyretcYl0AXdPsyvZxlNKaJ9BvVAO112hJiWzoEn3gYxE4zwtbK h5FTpwIb/zIQmoVbcfuSQ0SAuf7wTdr2WjLtU/aaBDM1qQJQJiRW22FOKlQZbV28fGWP K9Lw== X-Forwarded-Encrypted: i=1; AJvYcCWgfEcrRy/XKAssc5RvOHteMH6zJvhj4coiu7Prt208H2KXMlYYiGVTjLuX6sEskC9HgsT0OuPE2DA2TbwG@lists.postgresql.org X-Gm-Message-State: AOJu0YyxLkQfcg1N8m3kLT1CmtyTNFniYl7hVVRiF8WAk/Imyrhia9b5 vJbo+rsZ4dGMPeeZBebt8vjKiYPCuKaCrs+83hHYnX4/XhV9E6GdlE2H0k1WgBcQPws= X-Gm-Gg: AeBDieurtMT/jK+ZQCvfxIN73dJ7iB/+nfIggR9wTw/Rd8PO62RUkqwsxtDvDypFTNV CdYJqTXepCTANkYqcrnvGztkjTvpa9j4maibcSHGIeyqYcAonaVwydYyBQXb+Ru6+guYmIxdVdP C+RTVdW/6Y+vd5XmuDANSj7DhYl1c5t7gtyQSG8I4qYUyzJmLLcpjpHpjFTzYVB53gqLZLJBjND i3lCSkK/FSKM26dRPffxiYMmHTDJp6QVzeg4wMmz6CsxN1x44X+ZJW3VHdaj1Dz6dhVnGDbnPds Ppd6MV/3VCoRvkP62p5WV3X4x5gn4X/FQ/Htl3yu4g66U8NtgFjweEztB5JyvGCBsqrLbzUBROf H+E7K9zpX7n7sVR/t2ermY2Hmr4E2JuCj937qStr32R6o2+To/5WkPcQG0MBF/gJF44I7zO1D81 +E7+vfcuqUVKIlo5tnsABtCBuH+dtYejP/pJAQ X-Received: by 2002:a05:600c:a08:b0:487:300:d9ca with SMTP id 5b1f17b1804b1-488998e4137mr90112395e9.31.1775292615787; Sat, 04 Apr 2026 01:50:15 -0700 (PDT) Received: from localhost (109-81-168-142.rct.o2.cz. [109.81.168.142]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43d1e4f52easm24199521f8f.36.2026.04.04.01.50.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Apr 2026 01:50:15 -0700 (PDT) From: Antonin Houska To: Alvaro Herrera cc: Srinath Reddy Sadipiralla , Amit Kapila , Mihail Nikalayeu , Matthias van de Meent , Pg Hackers , Robert Treat Subject: Re: Adding REPACK [concurrently] In-reply-to: <202604031712.bqmynktpnakw@alvherre.pgsql> References: <202604031712.bqmynktpnakw@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Fri, 03 Apr 2026 19:24:30 +0200." 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: <10476.1775292614.1@localhost> Content-Transfer-Encoding: quoted-printable Date: Sat, 04 Apr 2026 10:50:14 +0200 Message-ID: <10477.1775292614@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera wrote: > On 2026-Apr-03, Antonin Houska wrote: > = > > diff --git a/src/backend/commands/repack_worker.c b/src/backend/comman= ds/repack_worker.c > > index 00b21ede481..c25dbeadff3 100644 > > --- a/src/backend/commands/repack_worker.c > > +++ b/src/backend/commands/repack_worker.c > = > > @@ -233,6 +234,13 @@ repack_setup_logical_decoding(Oid relid) > > = > > EnsureLogicalDecodingEnabled(); > > = > > + /* > > + * By declaring that our output plugin does not need shared catalogs= , we > > + * avoid waiting for completion of transactions running in other dat= abases > > + * than the one we're connected to. > > + */ > > + accessSharedCatalogsInDecoding =3D false; > > + > > /* > > * Neither prepare_write nor do_write callback nor update_progress i= s > > * useful for us. > = > I find this reliance on a global variable for this a bit icky. Would it > work to instead change the CreateInitDecodingContext() signature, so > that instead of "bool need_full_snapshot" it has a three-valued boolean > to distinguish the two cases from the original plus this new one? I > think the value could be stored in LogicalDecodingContext, from where > standby_decode() could obtain it. I agree that the global variable is not handy, but instead of modifying CreateInitDecodingContext(), how about adding a boolean returning callback= to OutputPluginCallbacks? The point is that whether shared catalogs are neede= d during the decoding or not is actually property of the plugin. -- = Antonin Houska Web: https://www.cybertec-postgresql.com