Re: [HACKERS] Cache Hash Index meta page. - Mailing list pgsql-hackers

From Mithun Cy
Subject Re: [HACKERS] Cache Hash Index meta page.
Date
Msg-id CAD__Ouj1Zb4mkUgU-OtDHEnAoz7Hx2U2drCuZEC0V_LVf2iHpw@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Cache Hash Index meta page.  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [HACKERS] Cache Hash Index meta page.  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
> HashMetaPage _hash_getcachedmetap(Relation rel, Buffer *metabuf, bool
> force_refresh);
>
> If the cache is initialized and force_refresh is not true, then this
> just returns the cached data, and the metabuf argument isn't used.
> Otherwise, if *metabuf == InvalidBuffer, we set *metabuf to point to
> the metabuffer, pin and lock it, use it to set the cache, release the
> lock, and return with the pin still held.  If *metabuf !=
> InvalidBuffer, we assume it's pinned and return with it still pinned.

Thanks, Robert I have made a new patch which tries to do same. Now I
think code looks less complicated.

-- 
Thanks and Regards
Mithun C Y
EnterpriseDB: http://www.enterprisedb.com

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: \if, \elseif, \else, \endif (was Re: [HACKERS] PSQL commands:\quit_if, \quit_unless)
Next
From: Thomas Munro
Date:
Subject: Re: [HACKERS] WIP: [[Parallel] Shared] Hash