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