Re: Compilation issues for HASH_STATISTICS and HASH_DEBUG options - Mailing list pgsql-hackers

From David Rowley
Subject Re: Compilation issues for HASH_STATISTICS and HASH_DEBUG options
Date
Msg-id CAApHDvoY8ZiH+eyOQ0bpuUPv4rx4iVimREJsr7-7-VTyNPzJGQ@mail.gmail.com
Whole thread Raw
In response to Re: Compilation issues for HASH_STATISTICS and HASH_DEBUG options  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Compilation issues for HASH_STATISTICS and HASH_DEBUG options
List pgsql-hackers
On Mon, 18 Aug 2025 at 13:10, Michael Paquier <michael@paquier.xyz> wrote:
> On Mon, Aug 18, 2025 at 12:56:02PM +1200, David Rowley wrote:
> > -#ifdef HASH_DEBUG
> > +#if defined(HASH_DEBUG) || defined(USE_ASSERT_CHECKING)
> >
> > The HASH_DEBUG does not add any extra fields, so the overhead only
> > amounts to the elog(DEBUG4) line.  HASH_STATISTICS adds extra fields
> > and counter incrementing, so I don't propose the same treatment for
> > that.
>
> If we do that, I guess that we could just remove HASH_DEBUG, keeping
> only HASH_STATISTICS.

I wondered about that and thought that there might be an above zero
chance that someone would want HASH_DEBUG without USE_ASSERT_CHECKING.
I don't really know if that person exists. It certainly isn't me.

David



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Compilation issues for HASH_STATISTICS and HASH_DEBUG options
Next
From: Tom Lane
Date:
Subject: Re: Compilation issues for HASH_STATISTICS and HASH_DEBUG options