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 1pPr1R-0002XR-GA for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Feb 2023 20:26:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pPr1Q-0003Yf-2e for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Feb 2023 20:26:28 +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 1pPr1P-0003YV-Or for pgsql-hackers@lists.postgresql.org; Wed, 08 Feb 2023 20:26:27 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pPr1N-0001dF-Cc for pgsql-hackers@postgresql.org; Wed, 08 Feb 2023 20:26:26 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id E3B54320031A; Wed, 8 Feb 2023 15:26:23 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 08 Feb 2023 15:26:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-transfer-encoding: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=1675887983; x= 1675974383; bh=jO3hOuDLNT3kDdgHFSLMtYtx2f/ywWdGFI29J2RIr3k=; b=o mOz6JvopHq13SadqNQSXqms0loqFXwdQWn9syjJDbShgPHGSoYTjkHnWNTSYe8bp rNEad4IpgTjPC9rqgULDRINXJmkGAC9ikTDN9TdGp6DUzUI4KT1XyL5v9Lx6YYN3 yfvJqc277fHeoZGcQHBnvXwmOJNGAsPmFB4aZ47Jy594bwOArfctr1E+RRGHuRRu pNLPjzkImB6pxkpKMBKjL766VfD83OCV06pq+OkR/2svRLi8nPm1yRPbQZEXaJO9 QxHRFbjL+vEBpLNuBBaDTmFlVVdCua07fp+SpwfXSvvZTzvEDDeEiAMu819M9VGC dn6B8DHFrugE4ZDL2RQ2w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=1675887983; x= 1675974383; bh=jO3hOuDLNT3kDdgHFSLMtYtx2f/ywWdGFI29J2RIr3k=; b=G 6VbyIUQA/CCSH7C+MgcH0yvbDukUzDPqXMWcAV/F0Fdccgr2r/8Sur0HFTI4DUvo /zAqS8WM1Nphv/MU1d6FV2v2NkRga17qWtZWJDAcrrGAA/+M5r0P3hk0QWPmWbcC 5uNdm1jL2+1cqh3ncml4NGELJeW21N+GWN6aCDwP081S1pCyrbq8Ryo/cS/TnBK4 3O/lUjVlpVTSJTlOmJmoq2FIjwhnfCemtYSmdnPs1UfapRuv1M6EoZyM09q1a4Zo ngUByl8cKczPcip6RJXruC8G5ziq+jC4N76dqXhBOQ5FvpUiY3fzq9SH1lOhzz4c vgpbcdghxQNR5lozXdnfw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudehuddgjeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetnhgu rhgvshcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtf frrghtthgvrhhnpeeuleeiuefhtdeitdekheekieeutdehkeejleelkefhkeehueettdet udeffedtvdenucffohhmrghinheptghirhhruhhsqdgtihdrtghomhenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvshesrghnrghr rgiivghlrdguvg X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 8 Feb 2023 15:26:22 -0500 (EST) Date: Wed, 8 Feb 2023 12:26:21 -0800 From: Andres Freund To: "Bagga, Rishu" Cc: pgsql-hackers , Heikki Linnakangas , Thomas Munro , "Debnath, Shawn" , vignesh C Subject: Re: SLRUs in the main buffer pool - Page Header definitions Message-ID: <20230208202621.53mmhammbfu5mes6@awork3.anarazel.de> References: <7C4D53F1-A156-4ABC-9B89-B2C253D5FF74@amazon.com> <7BAF384A-654C-4877-BB4D-EDE4E44A9326@amazon.com> <20230207202019.mhovw7aopjy3bile@awork3.anarazel.de> 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 Hi, On 2023-02-08 20:04:52 +0000, Bagga, Rishu wrote: > To summarize, our underlying effort is to move the SLRUs to the buffer > cache. We were working with Thomas Munro off a patch he introduced here > [1]. Munro’s patch moves SLRUs to the buffer cache by introducing the > pseudo db id 9 to denote SLRU pages, but maintains the current “raw” > data format of SLRU pages. The addition of page headers in our patch > resolves this issue [2] Munro mentions in this email [3]. > > Heikki Linnakangas then introduced patch on top of Munro’s patch that > modularizes the storage manager, allowing SLRUs to use it [4]. Instead > of using db id 9, SLRUs use spcOid 9, and each SLRU is its own relation. > Here, Heikki simplifies the storage manager by having each struct be > responsible for just one fork of a relation; thus increasing > extensibility of the smgr API, including for SLRUs. [5] We integrated > our changes introducing page headers for SLRU pages, and upgrade logic > to Heikki’s latest patch. That doesn't explain the bulk of the changes here. Why e.g. does any of the above require RelationGetSmgr() to handle the fork as well? Why do we need smgrtruncate_multi()? And why does all of this happens as one patch? As is, with a lot of changes mushed together, without distinct explanations for why is what done, this patch is essentially unreviewable. It'll not make progress in this form. It doesn't help that much to reference prior discussions in the email I'm responding to - the patches need to be mostly understandable on their own, without reading several threads. And there needs to be explanations in the code as well, otherwise we'll have no chance to understand any of this in a few years. > > > Rebased patch as per latest community changes since last email. > > > This version doesn't actually build. > > https://cirrus-ci.com/task/4512310190931968 > > [19:43:20.131] FAILED: > > src/test/modules/test_slru/test_slru.so.p/test_slru.c.o > > > As for the build failures, I was using make install to build, and make > check for regression tests. There's a *lot* more tests than the main regression tests. You need to make sure that they all continue to work. Enable tap tests and se check-world. > The build failures in this link are from unit tests dependent on custom > SLRUs, which would no longer apply. I’ve attached another patch that removes > these tests. I think you'd need to fix those tests, rather than just removing them. I suspect we're going to continue to want SLRU specific stats, but your patch also seems to remove those. Greetings, Andres Freund