RE: Compilation issues for HASH_STATISTICS and HASH_DEBUG options

From: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
To: 'David Rowley' <dgrowleyml(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>
Subject: RE: Compilation issues for HASH_STATISTICS and HASH_DEBUG options
Date: 2025-08-15 05:46:18
Message-ID: OSCPR01MB14966C484DA89971D976B8D95F534A@OSCPR01MB14966.jpnprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear David,

> FWIW, I've no personal need to keep HASH_DEBUG, but if someone does,
> then let's keep it. Maybe we can make it use elog(DEBUG<N>) rather
> than fprintf and at least build with it in some BF member so we notice
> sooner if someone breaks it again. (I've not checked if there's a good
> reason why we can't use elog(). Perhaps something dynahash related
> happens to early in backend startup...)

Just in case: actually, even if the HASH_DEBUG part is fixed on PG17, it could
not pass some tests. One example is initdb test [1].
ISTM, command_like() assumed that there are no outputs in stderr but this option
does. This meant no BF animals cannot set this option as-is.
After I changed them to elog(DEBUG1) (and set debug1 as default) I ran tests
under src/test, and they could pass.

[1]:
```
[13:55:38.836](0.001s) not ok 29 - options --locale-provider=icu --locale=und --lc-*=C: no stderr
[13:55:38.836](0.000s)
[13:55:38.836](0.000s) # Failed test 'options --locale-provider=icu --locale=und --lc-*=C: no stderr'
# at t/001_initdb.pl line 131.
[13:55:38.837](0.001s) # got: 'init_htab:
# TABLE POINTER 0x180ee70
# DIRECTORY SIZE 256
# SEGMENT SIZE 256
# SEGMENT SHIFT 8
# MAX BUCKET 3
# HIGH MASK 7
# LOW MASK 3
# NSEGS 1
...
```

Best regards,
Hayato Kuroda
FUJITSU LIMITED

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2025-08-15 05:47:42 Re: Sequence Access Methods, round two
Previous Message Kirill Reshke 2025-08-15 05:46:10 Re: Add mode column to pg_stat_progress_vacuum