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.94.2) (envelope-from ) id 1rh6sM-009eQx-78 for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Mar 2024 11:52:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rh6sK-007AGk-JH for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Mar 2024 11:52:57 +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.94.2) (envelope-from ) id 1rh6sJ-007AGc-BV for pgsql-hackers@lists.postgresql.org; Mon, 04 Mar 2024 11:52:56 +0000 Received: from wfhigh2-smtp.messagingengine.com ([64.147.123.153]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rh6sF-002n9d-Hd for pgsql-hackers@lists.postgresql.org; Mon, 04 Mar 2024 11:52:54 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfhigh.west.internal (Postfix) with ESMTP id A2CA118000C3; Mon, 4 Mar 2024 06:52:50 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 04 Mar 2024 06:52:50 -0500 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-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1709553170; x= 1709639570; bh=yqb1yJ/dYQa9fAttkFSMYIIXWlD54wca0WZHQthm7W8=; b=O KeuRpKUEr2vqRW1RsgyJh4RTpW/Dp9Mb2VKoK+7QXcRt9W6C/v9a7a4EfF+dn8tP 4EDE3pRqpUC92fRTxi0bTKVaze/nTe6zj09E/X/U2jRm2RDybXs3soqKOXdd03Zk N1nl6qVvWVlY6nXCBMIy29oBW+rkXrwNSeYzDBg8tQRTVPyBez5ywkRz4/xsmun8 Qiof26FltumTEhy3idTkQFboavH8hY6dmhC+JHroDZppMg0flqAaVepAD8EQj7jd GcPkd0G2tGRcHAnY/DAe9OirG8f90GdLcnYSvGI0lDAWddV4zmlj3HEz9MpDmEQm 6R4Fu5VuwNCauL/MJbk2Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrheejgdefvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpedktehlvhgr rhhoucfjvghrrhgvrhgrkdcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorh hgqeenucggtffrrghtthgvrhhnpedtffevffejuefghfejkeeuffeuheejiedvgfekjeei veffjeejgfehfeffjeekgfenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtoh hmpdhprghulhhgrhgrhhgrmhdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorh hg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 4 Mar 2024 06:52:49 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1709553167; bh=EWzhjlj4AMqfpRyPF+rZFhICdUnnmOkOL4vWSnEvVBM=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=P3AqFDtPeIdVc37vJyP3HM/T+/bkt4TWrHK6ILDDITCcFCAciD0oXVZhaPkxNesIS W+qHKtu5cBvTRFq78T6RlYIRrrfMPraSeOu5VghrXruCGwToi/iy3tXrFWosDuXWVW ak7TuukUj3aqZ4xA0KVO7HfjMLK8virWRn4N0dzWXgm/+Kea/CIKmjoJoH4rKDYA8g XY/dFGc45i+fAY65kxF0wAVT5V/UJqYxsKVQAGpZvIZ5g2OztSRNt3iREBjG6dOpb/ rUCvzExSjezk+qg8jDV03Ost/sfk9AeBRTO/7R+UOjGMdmzdsFe9lgWHN1h5xIBrAm oXz/Iqa+VpO6w== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 6247DCD5; Mon, 4 Mar 2024 12:52:47 +0100 (CET) Date: Mon, 4 Mar 2024 12:52:47 +0100 From: 'Alvaro Herrera' To: "Hayato Kuroda (Fujitsu)" Cc: "'pgsql-hackers@lists.postgresql.org'" Subject: Re: Some shared memory chunks are allocated even if related processes won't start Message-ID: <202403041152.fl4psozsstnt@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 On 2024-Mar-04, Hayato Kuroda (Fujitsu) wrote: > However, the second idea is still valid, which allows the allocation > of shared memory dynamically. This is a bit efficient for the system > which tuples won't be frozen. Thought? I think it would be worth allocating AutoVacuumShmem->av_workItems using dynamic shmem allocation, particularly to prevent workitems from being discarded just because the array is full¹; but other than that, the struct is just 64 bytes long so I doubt it's useful to allocate it dynamically. ¹ I mean, if the array is full, just allocate another array, point to it from the original one, and keep going. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "The problem with the facetime model is not just that it's demoralizing, but that the people pretending to work interrupt the ones actually working." -- Paul Graham, http://www.paulgraham.com/opensource.html