Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nFk0J-00052l-7q for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Feb 2022 21:50:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nFk0H-00048G-Qf for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Feb 2022 21:50:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nFk0G-000487-PG for pgsql-hackers@lists.postgresql.org; Thu, 03 Feb 2022 21:50:57 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nFk0E-0001B7-5R for pgsql-hackers@lists.postgresql.org; Thu, 03 Feb 2022 21:50:55 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 45EA13202240; Thu, 3 Feb 2022 16:50:52 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 03 Feb 2022 16:50:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; bh=m3qtXva/wERQE6iBrw6I5jd57MxSYFcC2tnbSh UYt8M=; b=GX6H/PLvfAbOcxChDqVekn0QZOwcBUUsADua00XyFwRfZgwlDLOBQJ slYGjAxSZre0tTpblrbTTmOdNl+CzJlWV77yJqUfMUjXrM1FcIibkcoAbR9ZsRDP SZqZJH3TrEAGuv/VoJ/z6MnHwwzUTANyuCGB0mVsu7pOc+xyGN7LlooeCkdIvBNQ FokQkevDNlIKuR6qZOemIAV8NDmZRsAWG//c69OFm5xE7V21ZdZws6qI2CCZ7dCH ZqPcBytk1voRZVFTWSuzsAl5aHBzhEcdkvoeLy01N6GprpK63KPHhy1FwvY5AIs7 9fQGJPSZgf8k3gci5aHLu3x48kv4N9tg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=m3qtXva/wERQE6iBr w6I5jd57MxSYFcC2tnbShUYt8M=; b=KPn+5VNbGjj0WYI9gbeq+OX2jPrS5gCqx WV9DD6JQMQlpnbkylkGekZievjWjp3ry/4pJBUDG1YCqBDAQGZNNO2yFzqzkdH/3 U8Y8yXvPTSmjvyl2Wjtm1+cyLg85WG8HG+BTpYeiCwOJVkFg1XeZUpcY74LeQd9i 5HM1XPgFmwt3ceXaz/uirCbl6vir3ot/gEgy2HyhDI7Dbmcm9H+wbWFk0x+BUrUV W5p/jINc6cG0gke/bglyp47/omcynOIRAdfIp1SxiKZvPzDhOkz4q0NNBTEPLKne f+667eXw43KGYPdTogroY2KL//+GpPudJKX0HRMUcdf5QXALgL4/Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrgeejgdduheefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrg htthgvrhhnpedukefhkeelueegveetheelffffjeegleeuudelfeefuedtleffueejfffh ueffudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 3 Feb 2022 16:50:50 -0500 (EST) Date: Thu, 3 Feb 2022 13:50:48 -0800 From: Andres Freund To: Robert Haas Cc: John Naylor , Peter Geoghegan , PostgreSQL Hackers Subject: Re: do only critical work during single-user vacuum? Message-ID: <20220203215048.rmwjzixdzaetedxq@alap3.anarazel.de> References: <20211210015616.o242b4xchhpglfcy@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2022-02-03 13:42:20 -0500, Robert Haas wrote: > They *do* have a choice. They can continue to operate the system in > multi-user mode, they can have read access to their data, and they can > run VACUUM and other non-XID-allocating commands to fix the issue. > Sure, their application can't run commands that allocate XIDs, but > it's not going to be able to do that if they go to single-user mode > either. I wonder if we shouldn't add some exceptions to the xid allocation prevention. It makes sense that we don't allow random DML. But it's e.g. often more realistic to drop / truncate a few tables with unimportant content, rather than spend the time vacuuming those. We could e.g. allow xid consumption within VACUUM, TRUNCATE, DROP TABLE / INDEX when run at the top level for longer than we allow it for anything else. > But it would still be better than going into single-user mode, which > provides even less functionality and has basically no advantages of > any kind. Indeed. Single user is the worst response to this (and just about anything else, really). Even just getting into the single user mode takes a while (shutdown checkpoint). The user interface is completely different (and awful). The buffer cache is completely cold. The system is slower because there's no wal writer / checkpointer running. Which basically is a list of things one absolutely do not wants when confronted with a wraparound situation. Greetings, Andres Freund