pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: dshash: Add sequential scan support.
Date: Fri, 11 Mar 2022 01:02:51 +0000
Message-ID: <E1nSTgB-000BxB-4B@gemulon.postgresql.org> (raw)

dshash: Add sequential scan support.

Add ability to scan all entries sequentially to dshash. The interface is
similar but a bit different both from that of dynahash and simple dshash
search functions. The most significant differences is that dshash's interfac
always needs a call to dshash_seq_term when scan ends. Another is
locking. Dshash holds partition lock when returning an entry,
dshash_seq_next() also holds lock when returning an entry but callers
shouldn't release it, since the lock is essential to continue a scan. The
seqscan interface allows entry deletion while a scan is in progress using
dshash_delete_current().

Reviewed-By: Andres Freund <andres@anarazel.de>
Author: Kyotaro Horiguchi <horikyoga.ntt@gmail.com>

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/352d297dc74feb0bf0dcb255cc0dfaaed2b96c1e

Modified Files
--------------
src/backend/lib/dshash.c         | 163 ++++++++++++++++++++++++++++++++++++++-
src/include/lib/dshash.h         |  23 ++++++
src/tools/pgindent/typedefs.list |   1 +
3 files changed, 186 insertions(+), 1 deletion(-)



view thread (11+ messages)  latest in thread

Message-ID: <E1nSTgB-000BxB-4B@gemulon.postgresql.org>
Permalink:  ../E1nSTgB-000BxB-4B@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1nSTgB-000BxB-4B@gemulon.postgresql.org

 · 

reply

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: andres@anarazel.de
  Subject: Re: pgsql: dshash: Add sequential scan support.
  In-Reply-To: <E1nSTgB-000BxB-4B@gemulon.postgresql.org>
  References: <E1nSTgB-000BxB-4B@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