Re: Surround CheckRelation[Oid]LockedByMe() with USE_ASSERT_CHECKING - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Surround CheckRelation[Oid]LockedByMe() with USE_ASSERT_CHECKING
Date
Msg-id ZoJiaiM0j_Y8gpf7@paquier.xyz
Whole thread Raw
In response to Surround CheckRelation[Oid]LockedByMe() with USE_ASSERT_CHECKING  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Responses Re: Surround CheckRelation[Oid]LockedByMe() with USE_ASSERT_CHECKING
Re: Surround CheckRelation[Oid]LockedByMe() with USE_ASSERT_CHECKING
List pgsql-hackers
On Mon, Jul 01, 2024 at 06:42:46AM +0000, Bertrand Drouvot wrote:
> While working on a rebase for [1] due to 0cecc908e97, I noticed that
> CheckRelationLockedByMe() and CheckRelationOidLockedByMe() are used only in
> assertions.
>
> I think it would make sense to declare / define those functions only for
> assert enabled build: please find attached a tiny patch doing so.
>
> Thoughts?

Not convinced that's a good idea.  What about out-of-core code that
may use these routines for runtime checks in non-assert builds?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Bertrand Drouvot
Date:
Subject: Re: Surround CheckRelation[Oid]LockedByMe() with USE_ASSERT_CHECKING
Next
From: Masahiko Sawada
Date:
Subject: Re: Conflict Detection and Resolution