Re: [HACKERS] Error handling for ShmemInitStruct and ShmemInitHash

2010-04-28 Thread Tom Lane
"Kevin Grittner" writes: > Tom Lane wrote: >> none of the other half are printing messages that are more useful >> than "out of shared memory" (which isn't even necessarily >> correct). > I think the messages in the locking area are a bit more useful than > "out of shared memory", but it would

Re: [HACKERS] Error handling for ShmemInitStruct and ShmemInitHash

2010-04-28 Thread Kevin Grittner
Tom Lane wrote: > none of the other half are printing messages that are more useful > than "out of shared memory" (which isn't even necessarily > correct). I think the messages in the locking area are a bit more useful than "out of shared memory", but it would be trivial to build the equivalen

Re: [HACKERS] Error handling for ShmemInitStruct and ShmemInitHash

2010-04-28 Thread Heikki Linnakangas
Tom Lane wrote: > The functions ShmemInitStruct and ShmemInitHash will return NULL on > certain failure conditions, apparently on the grounds that their caller > can print a more useful error message than they can. A quick survey > shows that about half the callers aren't remembering to check for

[HACKERS] Error handling for ShmemInitStruct and ShmemInitHash

2010-04-27 Thread Tom Lane
The functions ShmemInitStruct and ShmemInitHash will return NULL on certain failure conditions, apparently on the grounds that their caller can print a more useful error message than they can. A quick survey shows that about half the callers aren't remembering to check for NULL, and none of the ot