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 1pa487-0004cY-Vf for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Mar 2023 00:27:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pa486-0002t7-P1 for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Mar 2023 00:27:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pa486-0002sy-Fh for pgsql-hackers@lists.postgresql.org; Thu, 09 Mar 2023 00:27:34 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pa484-0002fs-2d for pgsql-hackers@postgresql.org; Thu, 09 Mar 2023 00:27:34 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 049A05C00FD; Wed, 8 Mar 2023 19:27:31 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 08 Mar 2023 19:27:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type: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=fm1; t=1678321651; x=1678408051; bh=z/ yPwVU9oiXEij9k+jHa+PLHaRqDUZ2FGAvXfB8xTik=; b=erZs3P5OOknPZZBxqy P1fnFNa6cc//U5wZdZMbxxxGkUs8qbdax4brxSBPK1Zs9vd1fwPcn10v1tdpciZw 2+nc14nOgRLsuNQttQrbQCixAlrcD71YtIL/C0WAyJ2gSj3zTJBat3ttf9j06Zat BBMEiCRNd3jiqH58jZCB290yGMGqty9CArDJ+wEQ5FR+TNDhEFYZVpnHmEPPD2To tRbg2DcWhQBkxdB40s8k27tCYAjqpfDVF1f+CR/18hpccHLGkKNmraar8xc4fN1h rRdXFADdQIU9yQDh9LjTdqA6oLupuuSAebnfvsUiP8Oyz3xR4BBVR1F+AZwSV+rj fsqw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id: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=fm1; t=1678321651; x=1678408051; bh=z/yPwVU9oiXEi j9k+jHa+PLHaRqDUZ2FGAvXfB8xTik=; b=p14rm3FpbK/tzm7AGgB5zFrq9rXM0 odO+Knd8/Z0Gv4y9AEuoi3/nw7HQd6NNZSiMbeMyBVs13zUoZFocCyPkSEXAJUZS sdHpEQuLyNePZiV4t4Plzfz+w/u4Xwx/yP+pHDDbRsHTxiK8dbJhjkhinF5EPVf5 Elm0pwJEt/hUW/X4vQVXG5MNTvUTI8dBHjr0Suq9XeYu17Fq7T1x/YxYVjABmHgh TFQCSF+t07jILte0A9TgeTaGCsPU4zJYJFnXtPvPDzwYVne/DyESIE1VnK9W86vf 53tExQrJun3Y1SFe46YaqC28eUVGU+difa3B9ssljxyGE6HNsSvx740LQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddugedgvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepvdfffeevhfetveffgeeiteefhfdtvdffjeevhfeuteegleduheetvedu ieettddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 8 Mar 2023 19:27:30 -0500 (EST) Date: Wed, 8 Mar 2023 16:27:29 -0800 From: Andres Freund To: Jim Nasby Cc: Masahiko Sawada , Melanie Plageman , Pg Hackers Subject: Re: Should vacuum process config file reload more often Message-ID: <20230309002729.6ugxojaw22xowa4u@awork3.anarazel.de> References: <7121ac43-d6ae-33ca-8ddc-538b0c6ab492@amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7121ac43-d6ae-33ca-8ddc-538b0c6ab492@amazon.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2023-03-08 11:42:31 -0600, Jim Nasby wrote: > On 3/2/23 1:36 AM, Masahiko Sawada wrote: > > > > > > For example, I guess we will need to take care of changes of > > > > > maintenance_work_mem. Currently we initialize the dead tuple space at > > > > > the beginning of lazy vacuum, but perhaps we would need to > > > > > enlarge/shrink it based on the new value? > Doesn't the dead tuple space grow as needed? Last I looked we don't allocate > up to 1GB right off the bat. > > > > I don't think we need to do anything about that initially, just because the > > > > config can be changed in a more granular way, doesn't mean we have to react to > > > > every change for the current operation. > > > Perhaps we can mention in the docs that a change to maintenance_work_mem > > > will not take effect in the middle of vacuuming a table. But, Ithink it probably > > > isn't needed. > > Agreed. > > I disagree that there's no need for this. Sure, if maintenance_work_memory > is 10MB then it's no big deal to just abandon your current vacuum and start > a new one, but the index vacuuming phase with maintenance_work_mem set to > say 500MB can take quite a while. Forcing a user to either suck it up or > throw everything in the phase away isn't terribly good. > > Of course, if the patch that eliminates the 1GB vacuum limit gets committed > the situation will be even worse. > > While it'd be nice to also honor maintenance_work_mem getting set lower, I > don't see any need to go through heroics to accomplish that. Simply > recording the change and honoring it for future attempts to grow the memory > and on future passes through the heap would be plenty. > > All that said, don't let these suggestions get in the way of committing > this. Just having the ability to tweak cost parameters would be a win. Nobody said anything about it not being useful to react to m_w_m changes, just that it's not required to make some progress . So I really don't understand what the point of your comment is. Greetings, Andres Freund