From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: thomas.munro@gmail.com
Cc: andres@anarazel.de
Cc: tgl@sss.pgh.pa.us
Cc: horiguchi.kyotaro@lab.ntt.co.jp
Cc: pgsql-hackers@postgresql.org
Subject: Re: pgsql: dshash: Add sequential scan support.
Date: Mon, 04 Jul 2022 17:31:46 +0900 (JST)
Message-ID: <20220704.173146.2012454546941903025.horikyota.ntt@gmail.com> (raw)
In-Reply-To: <CA+hUKGL15uga8gxhQ1FQ1PgDwVXcwDgs1u9b1ovA+JnUUPN=+w@mail.gmail.com>
References: <758107.1646960996@sss.pgh.pa.us>
<20220311012712.botrpsikaufzteyt@alap3.anarazel.de>
<CA+hUKGL15uga8gxhQ1FQ1PgDwVXcwDgs1u9b1ovA+JnUUPN=+w@mail.gmail.com>
At Mon, 4 Jul 2022 14:55:43 +1200, Thomas Munro <thomas.munro@gmail.com> wrote in
> [Re-directing to -hackers]
>
> On Fri, Mar 11, 2022 at 2:27 PM Andres Freund <andres@anarazel.de> wrote:
> > It's per-backend state at least and just used for assertions. We could remove
> > it. Or stop checking it in places where it could be set wrongly: dshash_find()
> > and dshash_detach() couldn't check anymore, but the rest of the assertions
> > would still be valid afaics?
>
> Yeah, it's all for assertions... let's just remove it. Those
> assertions were useful to me at some stage in development but won't
> hold as well as I thought, at least without widespread PG_FINALLY(),
> which wouldn't be nice.
>
> *dsa_get_address() might need to adjust the memory map with system
> calls, which might fail. If you think of DSA as not only an allocator
> but also a poor man's user level virtual memory scheme to tide us over
> until we get threads, then this is a pretty low level kind of
> should-not-happen failure that is analogous on some level to SIGBUS or
> SIGSEGV or something like that, and we should PANIC. Then we could
> claim that dsa_get_address() is no-throw. At least, that was one
> argument I had with myself while investigating that strange Solaris
> shm_open() failure, but ... I lost the argument. It's quite an
> extreme position to take just to support these assertions, which are
> of pretty limited value.
>
> [1] https://www.postgresql.org/message-id/20220701232009.jcwxpl45bptaxv5n%40alap3.anarazel.de
FWIW, the discussion above is convincing to me and the patch looks good.
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
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: horikyota.ntt@gmail.com, thomas.munro@gmail.com, andres@anarazel.de, tgl@sss.pgh.pa.us, horiguchi.kyotaro@lab.ntt.co.jp, pgsql-hackers@postgresql.org
Subject: Re: pgsql: dshash: Add sequential scan support.
In-Reply-To: <20220704.173146.2012454546941903025.horikyota.ntt@gmail.com>
References: <758107.1646960996@sss.pgh.pa.us> <20220311012712.botrpsikaufzteyt@alap3.anarazel.de> <CA+hUKGL15uga8gxhQ1FQ1PgDwVXcwDgs1u9b1ovA+JnUUPN=+w@mail.gmail.com> <20220704.173146.2012454546941903025.horikyota.ntt@gmail.com>
* 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