From: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Surround CheckRelation[Oid]LockedByMe() with USE_ASSERT_CHECKING |
Date: | 2024-07-01 09:41:31 |
Message-ID: | ZoJ5y0Q3td9FOVCO@ip-10-97-1-34.eu-west-3.compute.internal |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On Mon, Jul 01, 2024 at 05:01:46PM +0900, Michael Paquier wrote:
> 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?
Thanks for the feedback.
Yeah that could be an issue for CheckRelationLockedByMe() (CheckRelationOidLockedByMe()
is too recent to be a concern).
Having said that 1. out of core could want to use CheckRelationOidLockedByMe() (
probably if it was already using CheckRelationLockedByMe()) and 2. I just
submitted a rebase for [1] in which I thought that using
CheckRelationOidLockedByMe() would be a good idea.
So I think that we can get rid of this proposal.
[1]: https://www.postgresql.org/message-id/ZoJ5RVtMziIa3TQp%40ip-10-97-1-34.eu-west-3.compute.internal
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2024-07-01 09:42:13 | Re: Converting README documentation to Markdown |
Previous Message | Bertrand Drouvot | 2024-07-01 09:39:17 | Re: Avoid orphaned objects dependencies, take 3 |