Further cleanup of dynahash.c API, in pursuit of portability and
Tom Lane <tgl@sss.pgh.pa.us>
Further cleanup of dynahash.c API, in pursuit of portability and readability. Bizarre '(long *) TRUE' return convention is gone, in favor of just raising an error internally in dynahash.c when we detect hashtable corruption. HashTableWalk is gone, in favor of using hash_seq_search directly, since it had no hope of working with non-LONGALIGNable datatypes. Simplify some other code that was made undesirably grotty by promixity to HashTableWalk.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/xlogutils.c | modified | +20 −20 |
| src/backend/commands/command.c | modified | +2 −2 |
| src/backend/executor/spi.c | modified | +3 −5 |
| src/backend/lib/hasht.c | deleted | +0 −58 |
| src/backend/lib/Makefile | modified | +2 −2 |
| src/backend/postmaster/pgstat.c | modified | +58 −131 |
| src/backend/storage/buffer/buf_table.c | modified | +8 −15 |
| src/backend/storage/freespace/freespace.c | modified | +5 −10 |
| src/backend/storage/ipc/shmem.c | modified | +8 −8 |
| src/backend/storage/lmgr/lock.c | modified | +20 −30 |
| src/backend/storage/smgr/mm.c | modified | +12 −34 |
| src/backend/tcop/pquery.c | modified | +2 −2 |
| src/backend/utils/adt/ri_triggers.c | modified | +10 −15 |
| src/backend/utils/cache/relcache.c | modified | +71 −90 |
| src/backend/utils/hash/dynahash.c | modified | +102 −87 |
| src/backend/utils/mmgr/portalmem.c | modified | +27 −21 |
| src/include/lib/hasht.h | deleted | +0 −24 |
| src/include/storage/shmem.h | modified | +3 −3 |
| src/include/utils/hsearch.h | modified | +8 −5 |
| src/include/utils/portal.h | modified | +2 −2 |