Modify ShmemInitStruct and ShmemInitHash to throw errors internally,
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 28 Apr 2010 16:54:16 +0000 (16:54 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 28 Apr 2010 16:54:16 +0000 (16:54 +0000)
commit77acab75dfe2e4741c25c0cf550266caef1eebd2
tree1a5d86661c9394e2e79ae038775e874395f24f59
parent5f70a04c56b69fff0f356abae3091eaa54038a5b
Modify ShmemInitStruct and ShmemInitHash to throw errors internally,
rather than returning NULL for some-but-not-all failures as they used to.
Remove now-redundant tests for NULL from call sites.

We had to do something about this because many call sites were failing to
check for NULL; and changing it like this seems a lot more useful and
mistake-proof than adding checks to the call sites without them.
12 files changed:
contrib/pg_stat_statements/pg_stat_statements.c
doc/src/sgml/xfunc.sgml
src/backend/access/transam/slru.c
src/backend/commands/async.c
src/backend/postmaster/autovacuum.c
src/backend/postmaster/bgwriter.c
src/backend/replication/walreceiverfuncs.c
src/backend/replication/walsender.c
src/backend/storage/buffer/buf_table.c
src/backend/storage/ipc/shmem.c
src/backend/storage/lmgr/lock.c
src/backend/storage/lmgr/proc.c