Re: Surround CheckRelation[Oid]LockedByMe() with USE_ASSERT_CHECKING

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Surround CheckRelation[Oid]LockedByMe() with USE_ASSERT_CHECKING
Date: 2024-07-01 08:01:46
Message-ID: ZoJiaiM0j_Y8gpf7@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2024-07-01 08:05:14 Re: Conflict Detection and Resolution
Previous Message Bertrand Drouvot 2024-07-01 07:52:59 Re: Surround CheckRelation[Oid]LockedByMe() with USE_ASSERT_CHECKING