On Fri, Oct 2, 2026 at 7:20 AM Andres Freund <andres@anarazel.de> wrote:
Hi,
I'm sorry to be blunt, but this dangerous stuff. You're just doing mechanical replacements, without any analysis. That's a recipe for hard to encounter and find bugs.
It also doesn't make any sort of sense to me to use slock_* or whatnot. This has nothing to do with spinlocks.
Just about all the write side ones are completely wrong. This allows the field to be set while someone else holds the spinlock. As I said before, this needs careful, documented, analysis FOR EACH AND EVERY SINGLE CHANGE.
You can't sneak under the lock in this case. The insert lock seems very dangerous in general. You might have better luck with the info_lock. Have you measured contention?