RE: Compilation issues for HASH_STATISTICS and HASH_DEBUG options
Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>
From: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
To: 'David Rowley' <dgrowleyml@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>, Michael Paquier <michael@paquier.xyz>
Date: 2025-08-15T05:46:18Z
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
Commits
-
Remove HASH_DEBUG output from dynahash.c
- a98ccf727ebb 19 (unreleased) landed
-
Use elog(DEBUG4) for dynahash.c statistics output
- 05fcb9667c37 19 (unreleased) landed
-
Fix invalid format string in HASH_DEBUG code
- 2c7c08a090f2 14.20 landed
- 199a347d29e5 15.15 landed
- d809494cdfc5 16.11 landed
- 04b384b3efb2 17.7 landed
- 1571c7ca5dc9 18.0 landed
- 296cba276081 19 (unreleased) landed
-
Fix failing -D HASH_STATISTICS builds
- efe705b05cc1 17.7 landed
- e4ba326295c5 18.0 landed
- ca38912512a9 19 (unreleased) landed
-
Refactor initial hash lookup in dynahash.c
- cc5ef90edd80 17.0 cited
-
Remove large fill factor support from dynahash.c.
- be0a6666656e 14.0 cited
-
Remove broken and useless entry-count printing in HASH_DEBUG code.
- 9d4e56699957 10.0 cited
-
Partition the freelist for shared dynahash tables.
- 44ca4022f3f9 9.6.0 cited