greenplum-db/postgres

TableAM: Storage manager (SMGR) API is too specific heap

Eulerizeit opened this issue · 0 comments

Storage manager (SMGR) API is too specific heap. A patch to decouple the interface from heap-specific parts would allow new SMGR implementations.

Discussed during the 2020 Ottowa unconf. During that conversation the problem wasn't clear and we agreed to create a patch that would help to better clarify the issue as well as a proposed solution.

The issue:
There are 3 layers, buffermgmr, storage manager, and filemgmr. These are interlinked. In AO there is no buffer manager therefore the storage manager cannot assume that buffer manager stuff was done.

Storage manager makes assumptions about layout such as contiguous seg files which also need not be true. The WAL assumes that all of the buffmgmr/SMGR/file manager stuff is all true as well. this has caused us to have to hack info into the WAL logs for AO specific stuff.

FIX:
Should be such that the intended abstraction is in place and that HEAP is completely unchanged. This work will consist of going into the various APIs and bringing back the abstractions that previously existed.

This will be multiple patches