Hello hackers, On another thread, lots of undo log-related patches have been traded. Buried deep in the stack is one that I'd like to highlight and discuss in a separate thread, because it relates to a parallel thread of development and it'd be good to get feedback on it.
In commit 3eb77eba, Shawn Debnath and I extended the checkpointer fsync machinery to support more kinds of files. Next, we'd like to teach the buffer pool to deal with more kinds of buffers. The context for this collaboration is that he's working on putting things like CLOG into shared buffers, and my EDB colleagues and I are working on putting undo logs into shared buffers. We want a simple way to put any block-structured stuff into shared buffers, not just plain "relations". The questions are: how should buffer tags distinguish different kinds of buffers, and how should SMGR direct IO traffic to the right place when it needs to schlepp pages in and out? In earlier prototype code, I'd been using a special database number for undo logs. In a recent thread[1], Tom and others didn't like that idea much, and Shawn mentioned his colleague's idea of stealing unused bits from the fork number so that there is no net change in tag size, but we have entirely separate namespaces for each kind of buffered data. Here's a patch that does that, and then makes changes in the main places I have found so far that need to be aware of the new SMGR ID field. Thoughts? [1] https://www.postgresql.org/message-id/flat/CA%2BhUKG%2BDE0mmiBZMtZyvwWtgv1sZCniSVhXYsXkvJ_Wo%2B83vvw%40mail.gmail.com -- Thomas Munro https://enterprisedb.com
0001-Add-SmgrId-to-smgropen-and-BufferTag.patch
Description: Binary data
0002-Move-tablespace-dir-creation-from-smgr.c-to-md.c.patch
Description: Binary data