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 1w5hfv-003XSV-0Y for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Mar 2026 10:10:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w5hft-0025RD-1x for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Mar 2026 10:10:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w5hft-0025R4-0f for pgsql-hackers@lists.postgresql.org; Thu, 26 Mar 2026 10:10:49 +0000 Received: from lahtoruutu.iki.fi ([185.185.170.37]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w5hfr-00000001Gbu-0PQn for pgsql-hackers@postgresql.org; Thu, 26 Mar 2026 10:10:49 +0000 Received: from [10.0.2.15] (unknown [137.83.235.84]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: hlinnaka) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 4fhKKd34Pbz49PyD; Thu, 26 Mar 2026 12:10:45 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1774519846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x/Hh8U4+sRgj/iAsfLRlD0ANMdr5JljGmfA9b0NR8+k=; b=cefHPx0xllolE1dYGMdearvINq1dPPu6Fc/OHkUo3wN2HeSZT4ElLfPcSTNb0YWSCLzVDQ PJAeuYYmyCwPb3RIlE74/D7BLM0AIGytFEZIzdrIVa6tyqr4TGCFG40HKo3xCmGL3AI+00 LXlYeXs/BX9y0gu0KprRzRlGDKx4v5SjysZx7js9q/I5bp1ytbR/11BGHsHf1kBFXoTIBE fe/XVIUUBvGIhvvbclkNheJfFTmwPdmPNNpVYRo6inKJSLQTVSS0TtH1lk53WPUbFwgarV E/aqJE2C+1KnFi3LoLW9kYjun/ERadvdEeN1WQRgb4HYC14xdYKDpoGwiZS+Wg== ARC-Seal: i=1; a=rsa-sha256; d=iki.fi; s=lahtoruutu; cv=none; t=1774519846; b=eK20QGfnpAioe/4iudC4D831LhGv6YQriyhWxHR8AWlHJgw4Ymya1yxv66p2AXAxWY+NQY S5VAKTP0FKDZ7BoaXOeh39swqVEh7KpGLTpo2DaFS54hcJSZaH38zU8wMEUD/AQAVVXMJf ff0pMOIsG6sQx/z9hXU2kIQUlHn3yh+2V7TceqpZTaSJssnn5mcdwIPMcAu1XU+s5+fRfV dm32BvEK4o7z4GIKIyyb7iT+UOfecKNTCbiYwu26JO522QpGMbk5UOcjVCkpezdk+q3UOX Lrwou0xlLo/+T5gCGl9VqprKo3rswSznUrXGkLMPp684AfnuvAo3UT6CtMiAgw== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=hlinnaka smtp.mailfrom=hlinnaka@iki.fi ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1774519846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x/Hh8U4+sRgj/iAsfLRlD0ANMdr5JljGmfA9b0NR8+k=; b=viUZBWFwbVcNSKMvaUKltwjJp7cOEUNlKJu3IbRmvk6gL8g5eG5VUce35hvpAOh3yNbwlX 25Xu9qmAzR5AMWFMd39fbFSU6wsMQL/hpyE8MvmMOgPGyWR/PwBPO3AN1EDNUtMzhB+A0P phybj1ojtPVyU4kmafUmcee8s/fzGxzM8veZcMAq6Jj8mxvHYw13KLLRjTGMymcjgW1KYm rFIcuiHWH+7vzjLqn10j5OP3kEmSsH2bSEFg8Ld7+yMeb+X/wMYgcvpobK9//n968s+vP0 gyO+XRWmfwnhgwyQafajKvZXLq7QTLiRvkgvXMAvGaAuTlFAT0q5zWDA3DwLGw== Message-ID: <805a70e3-5f3d-4a8f-970c-858b3cbc0012@iki.fi> Date: Thu, 26 Mar 2026 12:10:41 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Better shared data structure management and resizable shared data structures To: Ashutosh Bapat Cc: Robert Haas , Andres Freund , pgsql-hackers , chaturvedipalak1911@gmail.com References: <26c766d6-db0f-43d3-a618-44f8d40a3121@iki.fi> <62b8dc23-8f6a-4cac-91ff-f74bb5bc159a@iki.fi> <8a6799be-bd42-49fb-8914-856c97bb1977@iki.fi> <113724ab-0028-493f-9605-6e8570f0939f@iki.fi> Content-Language: en-US From: Heikki Linnakangas In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 24/03/2026 17:32, Ashutosh Bapat wrote: > 0002 > void > InitShmemAllocator(PGShmemHeader *seghdr) > { > > The new ShmemIndex initialization code is cleaner and more > straightforward. It avoids the recursive nature of ShmemInitHash. > However with this change it's hard to keep track of all the > initialization steps and their dependencies. Attached is a patch that > makes small adjustments to the code to make it more clear. > > Use of variable hash_size is actually misleading since it's not the > size of the hash table but the expected/max number of entries in it. > Removing it makes code more readable. Thanks, committed this 0002 patch with those changes, to get that out of the way. - Heikki