pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
BUG #14764: #if HASH_DEBUG source in dynahash.c is fault. 2+ messages / 2 participants [nested] [flat]
Commits from this thread: 2017-08-02 cf9da98600 9d4e566999 Remove broken and useless entry-count printing in HASH_DEBUG code.
* BUG #14764: #if HASH_DEBUG source in dynahash.c is fault. @ 2017-08-02 03:23 twodragon72@gmail.com 0 siblings, 1 reply; 2+ messages in thread From: twodragon72@gmail.com @ 2017-08-02 03:23 UTC (permalink / raw) To: pgsql-bugs; +Cc: twodragon72@gmail.com The following bug has been logged on the website: Bug reference: 14764 Logged by: Choi Doo-Won Email address: twodragon72@gmail.com PostgreSQL version: 9.6.3 Operating system: CentOS Description: dynahash.c #if HASH_DEBUG fprintf(stderr, "init_htab:\n%s%p\n%s%ld\n%s%ld\n%s%d\n%s%ld\n%s%u\n%s%x\n%s%x\n%s%ld\n%s%ld\n", "TABLE POINTER ", hashp, "DIRECTORY SIZE ", hctl->dsize, "SEGMENT SIZE ", hctl->ssize, "SEGMENT SHIFT ", hctl->sshift, "FILL FACTOR ", hctl->ffactor, "MAX BUCKET ", hctl->max_bucket, "HIGH MASK ", hctl->high_mask, "LOW MASK ", hctl->low_mask, "NSEGS ", hctl->nsegs, "NENTRIES ", hash_get_num_entries(hctl)); #endif ", hash_get_num_entries(hctl)); -> ", hash_get_num_entries(hashp)); -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #14764: #if HASH_DEBUG source in dynahash.c is fault. @ 2017-08-02 16:04 Tom Lane <tgl@sss.pgh.pa.us> parent: twodragon72@gmail.com 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2017-08-02 16:04 UTC (permalink / raw) To: twodragon72@gmail.com; +Cc: pgsql-bugs twodragon72@gmail.com writes: > dynahash.c > #if HASH_DEBUG > fprintf(stderr, > "init_htab:\n%s%p\n%s%ld\n%s%ld\n%s%d\n%s%ld\n%s%u\n%s%x\n%s%x\n%s%ld\n%s%ld\n", > "TABLE POINTER ", hashp, > "DIRECTORY SIZE ", hctl->dsize, > "SEGMENT SIZE ", hctl->ssize, > "SEGMENT SHIFT ", hctl->sshift, > "FILL FACTOR ", hctl->ffactor, > "MAX BUCKET ", hctl->max_bucket, > "HIGH MASK ", hctl->high_mask, > "LOW MASK ", hctl->low_mask, > "NSEGS ", hctl->nsegs, > "NENTRIES ", hash_get_num_entries(hctl)); > #endif > ", hash_get_num_entries(hctl)); > -> > ", hash_get_num_entries(hashp)); Hm, yeah, that's broken, but I'm inclined to remove that field from the printout rather than fix the computation. Since we just initialized the hashtable, it can't possibly have any entries here. Also hash_get_num_entries makes assumptions that we could do without in debug code. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2017-08-02 16:04 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2017-08-02 03:23 BUG #14764: #if HASH_DEBUG source in dynahash.c is fault. twodragon72@gmail.com 2017-08-02 16:04 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox