Postgresql's pageinspect plug-in framework and data recovery exploration

1. Plug in code analysis pageinspect is a very typical and simple plug-in. Most processes can be learned and reused. If you need to write a new plug-in, you can directly copy and modify the following two functions, and most of the framework code can be used directly. get_raw_page the classic process of reading a page get_raw_page only retur ...

Posted by lrsdsout on Tue, 01 Mar 2022 16:50:55 +0100

Postgresql source code (33) Btree index reading - overall process&_ bt_first

function flow ExecScan ExecScanFetch IndexNext[Top level loop function] [1]index_beginscan: (scandesc = index_beginscan generate scandesc (yes) index_beginscan_internal[getr] btbeginscan: initialization IndexScanDesc and BTScanOpaque IndexScanDesc scan = ... BTScanOpaque so = ... ...

Posted by monkeyj on Tue, 15 Feb 2022 16:49:12 +0100

Postgresql source code (31) Btree index related system tables and overall structure

version: postgresql10.17 0 summary summary leaf page If the level 0 page (the bottom page) has a right brother, the first one is the first one of the right brothers (it should be the last one on this page. Note that this one does not belong to this page, but the smallest one on the next page is worth copying). Note: the leftmost page of ...

Posted by andrewgk on Thu, 10 Feb 2022 18:35:08 +0100