From: | "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com> |
---|---|
To: | pgsql-patches(at)postgresql(dot)org |
Subject: | Ctid chain following enhancement |
Date: | 2007-01-27 05:50:17 |
Message-ID: | 2e78013d0701262150i7e48018br27fbd3ce0309cf2e@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
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
block.
In the current code, we unconditionally drop pin of the current block
without
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
InvalidBuffer
to start with and is not released at the end of the loop.
heap_release_fetch()/
ReleaseAndReadBuffer() would release it if required.
Thanks,
Pavan
--
EnterpriseDB http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
cf-enhance-head.patch | application/octet-stream | 3.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-01-27 06:32:50 | Re: [HACKERS] less privileged pl install |
Previous Message | Tom Lane | 2007-01-27 05:14:31 | Re: Autovacuum launcher patch |