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 1r3zNu-006uJg-G1 for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Nov 2023 13:59:50 +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 1r3zMs-00E72c-EL for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Nov 2023 13:58:46 +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 1r3zMq-00E71Z-L3 for pgsql-hackers@lists.postgresql.org; Fri, 17 Nov 2023 13:58:45 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r3zMi-0061Un-L8 for pgsql-hackers@lists.postgresql.org; Fri, 17 Nov 2023 13:58:42 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 9BDF75C01EC; Fri, 17 Nov 2023 08:58:35 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 17 Nov 2023 08:58:35 -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:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1700229515; x= 1700315915; bh=GqgNi+G4AC908ARsw6D+CBQIOV1ZrUK9blH/SUnl47s=; b=U XeZRGBw3Eq42hUEf2Yx5AIaOLg/jTuktg68AVD86ZzY2qH2jdvWh2nQFJqGeC3+p a/NUv//zbxOQWgA6zzCbl6YLxrOce7dZzIiBA4j15oMOB4RuLvHA1e9aW/XGcqLX jGDUTXK8IRlFv7xparm4fq1zInGr0myqpJ0s7U9U35UKfchLVBeNG3l6GuArXrZx WYwlFjsXI//HcZw9rhAnQ7+4J2EpR3V2yIly7ULNfx4hSK1agRHyLZH27dgbz6eF F0gaNvkyWI0j4AJDLXjQ5MmnaEAPdZhEfxl4C/CK9m49vIbwCeFet6ZX609cmE5R GBm9WqAjrRaNO1W8XkdRA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudegtddgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepkedthfekveduuefgueelteekgfejgeekueduudeuveeu vddufffggfetiefhvdefnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghdpvg hnthgvrhhprhhishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 17 Nov 2023 08:58:34 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1700229512; bh=Ri+0ZchPcYEcNvLSkCg5EnysCq2CWMTyG6UATBPj0FY=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=V/QEIa59yJKfweFAJD5+5FB9cBGk1f2UxXsIUL6+JDda8V5Juu0w5+oJyaPvfSzUM zzG2+jPDP+FyT5QsZKc0vJqYy9k4haJWFEIZUuD6tCl3gpvQysJBJtgfkDPPXQdyJF j4FciDRdVBLLNUQ6lAvb659Vja+KfsifgwcSkUvgSqwSEz0JG7UP23ACqMQWnKUerP niaD3lJjAaTzoxU0X148923k4uSFH3x8BP1LxLPnfKsUK3MgTYQmP6zYHKGons9qqy JAyKDmD1r7BemWmjb32C0W+FJ9MFQtpQA/mVNAe81kov3QaM7htKfdjOVNhYheNpNy MUXebczuoHk2Q== Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id C8BA7127; Fri, 17 Nov 2023 14:58:32 +0100 (CET) Date: Fri, 17 Nov 2023 14:58:32 +0100 From: Alvaro Herrera To: Dilip Kumar Cc: "Andrey M. Borodin" , PostgreSQL Hackers Subject: Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock Message-ID: <202311171358.7becb6achg2e@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 2023-Nov-17, Dilip Kumar wrote: > On Thu, Nov 16, 2023 at 3:11 PM Alvaro Herrera wrote: > > > > I just noticed that 0003 does some changes to > > TransactionGroupUpdateXidStatus() that haven't been adequately > > explained AFAICS. How do you know that these changes are safe? > > IMHO this is safe as well as logical to do w.r.t. performance. It's > safe because whenever we are updating any page in a group we are > acquiring the respective bank lock in exclusive mode and in extreme > cases if there are pages from different banks then we do switch the > lock as well before updating the pages from different groups. Looking at the coverage for this code, https://coverage.postgresql.org/src/backend/access/transam/clog.c.gcov.html#413 it seems in our test suites we never hit the case where there is anything in the "nextidx" field for commit groups. To be honest, I don't understand this group stuff, and so I'm doubly hesitant to go without any testing here. Maybe it'd be possible to use Michael Paquier's injection points somehow? I think in the code comments where you use "w.r.t.", that acronym can be replaced with "for", which improves readability. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "All rings of power are equal, But some rings of power are more equal than others." (George Orwell's The Lord of the Rings)