Assert(LWLockHeldByMeInMode(lock, LW_EXCLUSIVE)) - Mailing list pgsql-hackers

From Thomas Munro
Subject Assert(LWLockHeldByMeInMode(lock, LW_EXCLUSIVE))
Date
Msg-id CAEepm=3adR-nw+N7eY1H6Xpf3w3VEqoFtbpho2ZK=JfKCfCCPA@mail.gmail.com
Whole thread Raw
Responses Re: Assert(LWLockHeldByMeInMode(lock, LW_EXCLUSIVE))  (Craig Ringer <craig@2ndquadrant.com>)
Re: Assert(LWLockHeldByMeInMode(lock, LW_EXCLUSIVE))  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers
Hi hackers,

Several times now when reading, debugging and writing code I've wished
that LWLockHeldByMe assertions specified the expected mode, especially
where exclusive locking is required.

What do you think about something like the attached?  See also an
example of use.  I will add this to the next commitfest.

--
Thomas Munro
http://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Whether to back-patch fix for aggregate transtype width estimates
Next
From: Tomas Vondra
Date:
Subject: Re: New design for FK-based join selectivity estimation