minor restrpos / markpos optimization

From: Neil Conway <neilc(at)samurai(dot)com>
To: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: minor restrpos / markpos optimization
Date: 2004-11-17 00:20:02
Message-ID: 1100650802.9430.7.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

This patch makes a minor optimization to the restrpos() and markpos()
implementations for btree and hash: to bump the reference count on a
buffer, it is more efficient to use IncrBufferRefCount() than to do a
ReadBuffer (for one thing we needn't acquire the BufMgrLock; we also
don't need to do a hash table lookup etc.)

Barring any objections I will apply to HEAD before end of day.

-Neil

Attachment Content-Type Size
readbuffer-opt-1.patch text/x-patch 2.0 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2004-11-17 00:46:37 docs patch - CSV import limitation
Previous Message Tom Lane 2004-11-17 00:18:10 Re: Win32 signals & sockets