Questionable codes - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Questionable codes
Date
Msg-id 19991214175454Y.t-ishii@sra.co.jp
Whole thread Raw
Responses Re: [HACKERS] Questionable codes
Re: [HACKERS] Questionable codes
List 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

2) in utils/hash/dynahash.c:hash_search():

Assert(saveState.currElem && !(saveState.currElem = 0));

Does anybody know what it is for?
--
Tatsuo Ishii


pgsql-hackers by date:

Previous
From: Christof Petig
Date:
Subject: Re: [HACKERS] Volunteer: Large Tuples / Tuple chaining
Next
From: "Hiroshi Inoue"
Date:
Subject: RE: [HACKERS] Volunteer: Large Tuples / Tuple chaining