Modify ShmemInitStruct and ShmemInitHash to throw errors internally,
Tom Lane <tgl@sss.pgh.pa.us>
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.
Files
| Path | Change | +/− |
|---|---|---|
| contrib/pg_stat_statements/pg_stat_statements.c | modified | +1 −5 |
| doc/src/sgml/xfunc.sgml | modified | +1 −3 |
| src/backend/access/transam/slru.c | modified | +1 −3 |
| src/backend/commands/async.c | modified | +1 −4 |
| src/backend/postmaster/autovacuum.c | modified | +1 −5 |
| src/backend/postmaster/bgwriter.c | modified | +9 −11 |
| src/backend/replication/walreceiverfuncs.c | modified | +8 −12 |
| src/backend/replication/walsender.c | modified | +11 −16 |
| src/backend/storage/buffer/buf_table.c | modified | +1 −4 |
| src/backend/storage/ipc/shmem.c | modified | +44 −37 |
| src/backend/storage/lmgr/lock.c | modified | +1 −5 |
| src/backend/storage/lmgr/proc.c | modified | +9 −8 |