Month: February 2022

Enterprise PostgreSQL Solutions

1. Overview Recently, I was working on an internal issue related with buffer manager in PostgreSQL, and I saw a typical use of the Lightweight lock in buffer manager like below. 1 INIT_BUFFERTAG(newTag, smgr_rnode.node, forkNum, blockNum); 2 newHash = BufTableHashCode(&newTag); 3 newPartitionLock = BufMappingPartitionLock(newHash); 4 LWLockAcquire(newPartitionLock, LW_SHARED); 5 buf_id =

1. Introduction Last year I wrote a blog about PostgreSQL’s timeline concept, which is essential for executing Point In Time Recovery (PITR) back to a particular timeline and particular Log Sequence Number (LSN). But we have not talked about the idea of LSN in which everything else is built upon.