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 1w8y70-0014kD-1E for pgsql-hackers@arkaria.postgresql.org; Sat, 04 Apr 2026 10:20:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w8y5z-00G0Sk-2K for pgsql-hackers@arkaria.postgresql.org; Sat, 04 Apr 2026 10:19:16 +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 1w8y5z-00G0Sc-1A for pgsql-hackers@lists.postgresql.org; Sat, 04 Apr 2026 10:19:15 +0000 Received: from fhigh-b3-smtp.messagingengine.com ([202.12.124.154]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w8y5x-00000000VOM-2PTY for pgsql-hackers@lists.postgresql.org; Sat, 04 Apr 2026 10:19:14 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfhigh.stl.internal (Postfix) with ESMTP id D1ED07A012B; Sat, 4 Apr 2026 06:19:12 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Sat, 04 Apr 2026 06:19:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1775297952; x=1775384352; bh=6 1bKmH+ZwRmpcM8FNy+62LjE3KWeS6xnr7y2+QUODgM=; b=lniYZdUT8DxZHzOcD Hu1HKPeWG71pw9ocFyDsKr1aUCvIiiJx4KfexFsTXZs9bUzt4mmogtN/S/dm2FJ/ btvbHKhxT+QJ/lTXgzncZEHsFiTD7TsMg36WMaoOFky07uJOkX2N6GC4+c9vIUlv MhnImZkkXHB0fFPxMv0O2xv0W14UcPga/frv1RGsT3fvkL7pOZe6XDF3LhcCJWBD McFeXR1/b2n7mxs2ihJWQ5shWfNulgagWhZA2QAxUj0lddKKGHBaHe++YdqSC/hY aiDRBa/dC1Zc2t2iTrfjVbhR4YWOCFjpmUBt5l7txepjcFvTWAjVvdwiCfT4pLY6 xGbUQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdduudehlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpedktehlvhgrrhho ucfjvghrrhgvrhgrkdcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpedufefhudekvddtueegveegkeehudeiheeuieffgfelvdej tdehuefgheeutefftdenucffohhmrghinhepphhoshhtghhrrdgvshdpvghnthgvrhhprh hishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrghdpnhgspghrtg hpthhtohepkedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprghhsegthigsvghr thgvtgdrrghtpdhrtghpthhtohepkhhurhhouggrrdhhrgihrghtohesfhhujhhithhsuh drtghomhdprhgtphhtthhopegrmhhithdrkhgrphhilhgrudeisehgmhgrihhlrdgtohhm pdhrtghpthhtohepsghovghkvgifuhhrmhdophhoshhtghhrvghssehgmhgrihhlrdgtoh hmpdhrtghpthhtohepmhhihhgrihhlnhhikhgrlhgrhigvuhesghhmrghilhdrtghomhdp rhgtphhtthhopehsrhhinhgrthhhvddufeefsehgmhgrihhlrdgtohhmpdhrtghpthhtoh epphhgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg pdhrtghpthhtoheprhhosgesgiiiihhllhgrrdhnvght X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 4 Apr 2026 06:19:12 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1775297950; bh=sDJGN6FYygZZmsH9u3hc10w1QC5tEBdgUpg9j+BjhJQ=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=qnjTWYzhe+owfQ9jSVt4PkilHnsHdBYuvqC8LaoZxyTmAQOGdriHrs2FnPKcHje3V yr80OdGddDf/ph4p8waKZAUJjX4uCfaudX3e6TRum/kJXU1VfzFsT+1WrzqMv0uWS7 5WX9ZzDxZly5Iu0W9vSR4rFYyP92hDk3Y9zRPBjjJ+eyt7CRTJgw2go+oHd/MApcbl kKTZtOJtFOGCxB8jP61/fdhDfSsju0y6JdgW+PpHM95XhXbSi9Awy55IC8kY+8rcqt TDAfnmJqc6k4o+7zi/T9TBkV3KcXeWmmINmiBPfpft7KZBq5b7UyhlNo9PGftBX1mm g0Qc8RJRlMkXA== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id 57E2D7C; Sat, 04 Apr 2026 12:19:10 +0200 (CEST) Date: Sat, 4 Apr 2026 12:19:10 +0200 From: 'Alvaro Herrera' To: "Hayato Kuroda (Fujitsu)" Cc: Antonin Houska , Srinath Reddy Sadipiralla , Amit Kapila , Mihail Nikalayeu , Matthias van de Meent , Pg Hackers , Robert Treat Subject: Re: Adding REPACK [concurrently] Message-ID: <202604040949.opyhm3tgddvt@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello, On 2026-Apr-04, Hayato Kuroda (Fujitsu) wrote: > While testing REPACK CONCURRENTLY command with xid_wraparound module, noticed that > wraparound-autovac worker was terminated with an error like below. > > `` > ERROR: could not wait for concurrent REPACK > DETAIL: Process 41512 waits for REPACK running on process 41027 > CONTEXT: waiting for ShareUpdateExclusiveLock on relation 16384 of database 5 > automatic vacuum of table "postgres.public.test" > ``` > > The behavior is different from other commands, like LOCK and maybe normal REPACK. > In these cases the autovac worker would wait till the command fails. > > Is it an intentional behavior? If so, what is the advantage that we terminate the > failsafe vacuum? Hmm, this is intentional; see here: https://postgr.es/m/202604011050.7ya3k4ccd3hg@alvherre.pgsql Note that in order for this to happen, the autovacuum must be starting when the repack is already underway. The theory behind this behavior is that the autovacuum run is not useful anyway: its purpose is to advance the freeze xmin/multixact, but the repack is also going to do that. Once repack is done, autovacuum can assess again whether an emergency vacuum is needed, and launch a worker in that case. Do you think it would be better if we allowed autovacuum to continue? I'm not 100% myself of this new behavior, and it would be very good to give it some more thought. I suppose it's unfortunate that autovacuum launcher is going to try again and again to get workers to process that table, and they are going to be killed over and over. Maybe it would be better to have autovac ignore those tables. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "Para tener más hay que desear menos"