Re: pgsql: dshash: Add sequential scan support.
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>,
Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-07-05T03:21:40Z
Lists: pgsql-hackers
Attachments
- v3-0001-Fix-lock-assertions-in-dshash.c.patch (text/x-patch) patch v3-0001
On Tue, Jul 5, 2022 at 11:25 AM Andres Freund <andres@anarazel.de> 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); > > + assert_no_lock_held_by_me(hash_table); > > I am a *bit* wary about the costs of that, even in assert builds - each of the > partition checks in the loop will in turn need to iterate through > held_lwlocks. But I guess we can also just later weaken them if it turns out > to be a problem. Maybe we should add assertion support for arrays of locks, so we don't need two levels of loop? Something like the attached?
Commits
-
Fix lock assertions in dshash.c.
- eed959a457ea 16.0 landed
- 53df1e28d2f7 15.0 landed
- cd26139a3056 11.17 landed
- 4f88dbac22a8 12.12 landed
- 7cdd0c2d7cdf 13.8 landed
- 5e7608e81ebb 14.5 landed
-
dshash: Add sequential scan support.
- 352d297dc74f 15.0 cited