From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] Questionable codes |
Date: | 1999-12-14 16:25:10 |
Message-ID: | 199912141625.LAA14511@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> I have found a few questionable codings. I'm not sure if it really
> hurts anything. Suggestions are welcome.
>
> 1) in storage/lmgr/lock.c: LockShmemSize()
>
> size += MAXALIGN(maxBackends * sizeof(PROC)); /* each MyProc */
> size += MAXALIGN(maxBackends * sizeof(LOCKMETHODCTL)); /* each
>
> shouldn't be:
>
> size += maxBackends * MAXALIGN(sizeof(PROC)); /* each MyProc */
> size += maxBackends * MAXALIGN(sizeof(LOCKMETHODCTL)); /* each
Yes, you are correct. The bottom one is better.
>
> 2) in utils/hash/dynahash.c:hash_search():
>
> Assert(saveState.currElem && !(saveState.currElem = 0));
>
> Does anybody know what it is for?
No idea.
--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1999-12-14 16:25:40 | Re: [HACKERS] Volunteer: Large Tuples / Tuple chaining |
Previous Message | Tom Lane | 1999-12-14 16:23:24 | Re: [HACKERS] Questionable codes |