On Thu, Aug 26, 2021 at 5:59 AM Robert Haas <robertmh...@gmail.com> wrote: > Andres has been working -- I think for years now -- on replacing the > buffer mapping table with a radix tree of some kind. That strikes me > as very similar to what you're doing here. The per-relation data can > then include not only the kind of stuff you're talking about but very > fundamental things like how long it is and where its buffers are in > the buffer pool. Hopefully we don't end up with dueling patches.
FTR I have a patch in development that adds a demand-paged (though Anastasia recently suggested reconsidering that) per-SMGR relation shmem object pool that initially tracks precisely "how long it is", but I hope it would provide a hook to hang many other things on in future that need coordination at the relation level, such as synchronized scan position, and I hope, radix-based buffer mappings. Could be relevant? https://commitfest.postgresql.org/34/2933/ (I'll rebase it soon).