Re: pgsql: dshash: Add sequential scan support.

2022-07-10 Thread Thomas Munro
On Tue, Jul 5, 2022 at 3:21 PM Thomas Munro wrote: > On Tue, Jul 5, 2022 at 11:25 AM Andres Freund wrote: > > On 2022-07-05 11:20:54 +1200, Thomas Munro wrote: > > > Since there were 6 places with I-hold-no-lock assertions, I shoved the > > > loop into a function so I could do: > > > > > > -

Re: pgsql: dshash: Add sequential scan support.

2022-07-04 Thread Thomas Munro
On Tue, Jul 5, 2022 at 11:25 AM Andres Freund wrote: > On 2022-07-05 11:20:54 +1200, Thomas Munro wrote: > > Since there were 6 places with I-hold-no-lock assertions, I shoved the > > loop into a function so I could do: > > > > - Assert(!status->hash_table->find_locked); > > +

Re: pgsql: dshash: Add sequential scan support.

2022-07-04 Thread Andres Freund
Hi, On 2022-07-05 11:20:54 +1200, Thomas Munro wrote: > On Tue, Jul 5, 2022 at 8:54 AM Andres Freund wrote: > > > 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 witho

Re: pgsql: dshash: Add sequential scan support.

2022-07-04 Thread Thomas Munro
On Tue, Jul 5, 2022 at 8:54 AM Andres Freund wrote: > On 2022-07-04 14:55:43 +1200, Thomas Munro 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 d

Re: pgsql: dshash: Add sequential scan support.

2022-07-04 Thread Andres Freund
Hi, On 2022-07-04 14:55:43 +1200, Thomas Munro wrote: > Right, as seen in the build farm at [1]. Also reproducible with something > like: > > @@ -269,6 +269,14 @@ dsm_impl_posix(dsm_op op, dsm_handle handle, Size > request_size, > return false; > } > > + /* XXX rand

Re: pgsql: dshash: Add sequential scan support.

2022-07-04 Thread Zhihong Yu
On Sun, Jul 3, 2022 at 7:56 PM Thomas Munro wrote: > [Re-directing to -hackers] > > On Fri, Mar 11, 2022 at 2:27 PM Andres Freund wrote: > > On 2022-03-10 20:09:56 -0500, Tom Lane wrote: > > > Andres Freund writes: > > > > dshash: Add sequential scan support. > > > > Add ability to scan all ent

Re: pgsql: dshash: Add sequential scan support.

2022-07-04 Thread Kyotaro Horiguchi
At Mon, 4 Jul 2022 14:55:43 +1200, Thomas Munro wrote in > [Re-directing to -hackers] > > On Fri, Mar 11, 2022 at 2:27 PM Andres Freund 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 wron

Re: pgsql: dshash: Add sequential scan support.

2022-07-03 Thread Thomas Munro
[Re-directing to -hackers] On Fri, Mar 11, 2022 at 2:27 PM Andres Freund wrote: > On 2022-03-10 20:09:56 -0500, Tom Lane wrote: > > Andres Freund writes: > > > dshash: Add sequential scan support. > > > Add ability to scan all entries sequentially to dshash. The interface is > > > similar but a