Re: Restore support for USE_ASSERT_CHECKING in extensions only

2025-01-10 Thread Andrew Kane
Thank you both!

Re: Restore support for USE_ASSERT_CHECKING in extensions only

2025-01-10 Thread David Rowley
On Sat, 11 Jan 2025 at 13:05, David Rowley wrote: > > On Sat, 11 Jan 2025 at 12:56, Andrew Kane wrote: > > I've updated the patch to make verify_compact_attribute a no-op. > > > > The extension sets USE_ASSERT_CHECKING, which is why the macro approach > > doesn't work (it won't take that path).

Re: Restore support for USE_ASSERT_CHECKING in extensions only

2025-01-10 Thread Tom Lane
Andrew Kane writes: > I've updated the patch to make verify_compact_attribute a no-op. > The extension sets USE_ASSERT_CHECKING, which is why the macro approach > doesn't work (it won't take that path). LGTM > Also, it looks like it fails when creating the extension / loading the > shared librar

Re: Restore support for USE_ASSERT_CHECKING in extensions only

2025-01-10 Thread David Rowley
On Sat, 11 Jan 2025 at 12:56, Andrew Kane wrote: > I've updated the patch to make verify_compact_attribute a no-op. > > The extension sets USE_ASSERT_CHECKING, which is why the macro approach > doesn't work (it won't take that path). > > Also, it looks like it fails when creating the extension /

Re: Restore support for USE_ASSERT_CHECKING in extensions only

2025-01-10 Thread David Rowley
On Sat, 11 Jan 2025 at 12:48, Tom Lane wrote: > > David Rowley writes: > > On Sat, 11 Jan 2025 at 12:32, Tom Lane wrote: > >> No, this completely fails to address the problem. The concern is > >> that the extension has been compiled under USE_ASSERT_CHECKING, > >> so it will try to call the fun

Re: Restore support for USE_ASSERT_CHECKING in extensions only

2025-01-10 Thread Andrew Kane
I've updated the patch to make verify_compact_attribute a no-op. The extension sets USE_ASSERT_CHECKING, which is why the macro approach doesn't work (it won't take that path). Also, it looks like it fails when creating the extension / loading the shared library (on Ubuntu), not when linking (as

Re: Restore support for USE_ASSERT_CHECKING in extensions only

2025-01-10 Thread Tom Lane
David Rowley writes: > On Sat, 11 Jan 2025 at 12:32, Tom Lane wrote: >> No, this completely fails to address the problem. The concern is >> that the extension has been compiled under USE_ASSERT_CHECKING, >> so it will try to call the function. If the function's not there >> in core, kaboom. >

Re: Restore support for USE_ASSERT_CHECKING in extensions only

2025-01-10 Thread David Rowley
On Sat, 11 Jan 2025 at 12:32, Tom Lane wrote: > > David Rowley writes: > > hmm, I didn't think of that scenario. I think since > > verify_compact_attribute() does nothing when USE_ASSERT_CHECKING isn't > > defined that we might as well define a ((void) 0) macro to avoid the > > undefined symbol

Re: Restore support for USE_ASSERT_CHECKING in extensions only

2025-01-10 Thread Tom Lane
David Rowley writes: > hmm, I didn't think of that scenario. I think since > verify_compact_attribute() does nothing when USE_ASSERT_CHECKING isn't > defined that we might as well define a ((void) 0) macro to avoid the > undefined symbol error. That'll avoid the useless call in your debug > build

Re: Restore support for USE_ASSERT_CHECKING in extensions only

2025-01-10 Thread David Rowley
On Sat, 11 Jan 2025 at 11:27, Andrew Kane wrote: > Prior to 6f3820f, extensions could be compiled with -DUSE_ASSERT_CHECKING > whether or not the Postgres installation was configured with --enable-cassert > (to enable at least some assertion checking). However, after 6f3820f, linking > fails wi