Attached is a patch which should marginally improve the ctid chain followin
code path when current and the next tuple in the chain are in the same

In the current code, we unconditionally drop pin of the current block
checking whether the next tuple is the same block or not. ISTM that this can
be improved.

The attached patch replaces the heap_fetch() with heap_release_fetch() in
EvalPlanQual() and thus releases the buffer iff the chain gets into a
different block.
Similarly, ReadBuffer() is replaced with ReleaseAndReadBuffer() in
heap_get_latest_tid() for the same reason. The buffer is set to
to start with and is not released at the end of the loop.
ReleaseAndReadBuffer() would release it if required.




Attachment: cf-enhance-head.patch
Description: Binary data

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?


Reply via email to