PostgreSQL Internal Subquery Resolution Process

Query Structure SELECT val FROM (SELECT val FROM source_table); Internal Representation The derived clause FROM (SELECT val FROM source_table) generates a RangeTblEntry for the enclosing query. The base relation source_table generates a separate RangeTblEntry inside the nested query. All RangeTblEntry instances form a range table list, linke ...

Posted on Thu, 11 Jun 2026 18:24:16 +0000 by Gump

B+Tree Index Concurrency Control and Latch Crabbing

Concurrency Strategy in B+Trees Implementing thread safety in a B+Tree index requires protecting both the internal data of nodes and the structural integrity during split and merge operations. The standard protocol for this is Latch Crabbing, where a thread acquires a latch on a child node and only releases the latch on the parent if the child ...

Posted on Wed, 13 May 2026 03:39:59 +0000 by CUatTHEFINISH

Decoding PostgreSQL’s pg_filenode.map File Structure

Understanding OID to Filenode Mapping In a standard PostgreSQL instance, each table and index corresponds to a physical file on disk. This relationship is primarily managed through the relfilenode identifier found in the pg_class catalog. For most user-defined tables, the Object Identifier (OID) aligns directly with this filenode value. However ...

Posted on Sat, 09 May 2026 22:44:49 +0000 by hebisr