From: Jeff Davis <jdavis@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Allow simplehash to use already-calculated hash values.
Date: Thu, 01 Aug 2019 23:08:15 +0000
Message-ID: <E1htKBD-0002wF-2E@gemulon.postgresql.org> (raw)
Allow simplehash to use already-calculated hash values.
Add _lookup_hash and _insert_hash functions for callers that have
already calculated the hash value of the key.
The immediate use case is for hash algorithms that write to disk in
partitions. The hash value can be calculated once, used to perform a
lookup, used to select the partition, then written to the partition
along with the tuple. When the tuple is read back, the hash value does
not need to be recalculated.
Author: Jeff Davis
Reviewed-by: Andres Freund
Discussion: https://postgr.es/m/48abe675e1330f0c264ab2fe0d4ff23eb244f9ef.camel%40j-davis.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/6ae4e8eae78e0781633f7b40a1b5cc189bc40923
Modified Files
--------------
src/include/lib/simplehash.h | 74 ++++++++++++++++++++++++++++++++++++++------
1 file changed, 65 insertions(+), 9 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: jdavis@postgresql.org
Subject: Re: pgsql: Allow simplehash to use already-calculated hash values.
In-Reply-To: <E1htKBD-0002wF-2E@gemulon.postgresql.org>
References: <E1htKBD-0002wF-2E@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox