Assert(LWLockHeldByMeInMode(lock, LW_EXCLUSIVE))

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Assert(LWLockHeldByMeInMode(lock, LW_EXCLUSIVE))
Date: 2016-06-18 03:28:18
Message-ID: CAEepm=3adR-nw+N7eY1H6Xpf3w3VEqoFtbpho2ZK=JfKCfCCPA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
bufmgr-assert-lwlock-mode.patch application/octet-stream 631 bytes
test-lwlock-mode.patch application/octet-stream 1.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2016-06-18 03:48:21 Re: pgsql: Try again to fix the way the scanjoin_target is used with partia
Previous Message Tom Lane 2016-06-18 03:26:09 Re: pgsql: Try again to fix the way the scanjoin_target is used with partia