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 1mvV99-0006NB-SN for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Dec 2021 01:56:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mvV98-00082G-KE for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Dec 2021 01:56:26 +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 1mvV96-0007yW-Mo for pgsql-hackers@lists.postgresql.org; Fri, 10 Dec 2021 01:56:26 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mvV93-0007Ir-NS for pgsql-hackers@lists.postgresql.org; Fri, 10 Dec 2021 01:56:23 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id E1AB53201E39; Thu, 9 Dec 2021 20:56:18 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 09 Dec 2021 20:56:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=iqyNKiuGqsGyF+RJlHzafb9zLZl OgSWrHHCvzvimg/U=; b=vColIjshjpEKlOHFnpYdM8Wi3tzpqa+FovxdqrhlBlc BCLHbnUn7rv/N7J1vpRVYrtJtzNu9DhpHUZUSCFQEOkksFTEwgevOu+pczukLidi BjqH/veJFLwXjruNkyWsBwEZUPpsfzMl8CtQGP66x/sBHgAUZYd1hOZxIOYmtok0 bADDU+ZHm4qheawc0yabHBlG5jqNnABezpIZ6Fs4rdE3RRW2+0aGLYUV4Ft+BlCK GUQ9bLN2bN3TUBlQAN9fVUl3X6j5GJoyK3lYK+TxL72hXHgUuxA4XEoHJUq2m9L5 C2ncS0Oh5Fu+lrT9gDF4uVO3BpB2nXaOGuywE+3Lw2Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=iqyNKi uGqsGyF+RJlHzafb9zLZlOgSWrHHCvzvimg/U=; b=e1vwzpucdNkVsEotV6Sjcv YIrtOh/eujtEEeeHfOCIxd+6PYwn02uAo0Xy8P8pw7colQShS0J36GMbAR+kOYFv mhYIAN8bWtD6oyCrD+bzSxdDXZ+96L0tSZZ36d3QB0CYMExBAn444srWG6LTw4KP sUu+Os9IsK1bBJlhc3GZt/GCVECP9ijADjywfe5ZIvG/H26ei8b2L/6j4o3TYOhk G5JNmibeSXnNp3FDQwB7z45TxW2+z53J/p20JJ/9ciMcB8qiUUFTHPaTWJEKMk/l xwlnMDCNwyNHoBZBzoV/ppe6VEtRftxqIGkv0o4XoHT6nJdJfAkir+lL8pnRN78w == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrkedugdegtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughrvghs ucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrfgrth htvghrnhepudekhfekleeugeevteehleffffejgeelueduleeffeeutdelffeujeffhfeu ffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 9 Dec 2021 20:56:17 -0500 (EST) Date: Thu, 9 Dec 2021 17:56:16 -0800 From: Andres Freund To: Peter Geoghegan Cc: John Naylor , PostgreSQL Hackers Subject: Re: do only critical work during single-user vacuum? Message-ID: <20211210015616.o242b4xchhpglfcy@alap3.anarazel.de> References: 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 2021-12-09 16:34:53 -0800, Peter Geoghegan wrote: > But even still, why not have some variant of single-user mode just for > this task? > Something that's easy to use when the DBA is rudely > awakened at 4am -- something a little bit like a big red button that > fixes the exact problem of XID exhaustion, in a reasonably targeted > way? I don't think that this needs to involve the VACUUM command > itself. I think we should move *away* from single user mode, rather than the opposite. It's a substantial code burden and it's hard to use. I don't think single user mode is a good fit for this anyway - it's inherently focussed on connecting to a single database. But wraparound issues often involve more than one database (often just because of shared catalogs). Also, requiring a restart will often exascerbate the problem - the cache will be cold, there's no walwriter, etc, making the vacuum slower. Making vacuum not consume an xid seems like a lot more promising - and quite doable. Then there's no need to restart at all. Greetings, Andres Freund