From 77acab75dfe2e4741c25c0cf550266caef1eebd2 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 28 Apr 2010 16:54:16 +0000 Subject: 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. --- src/backend/commands/async.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/backend/commands/async.c') diff --git a/src/backend/commands/async.c b/src/backend/commands/async.c index d3bb8d492f..c3e783a8ca 100644 --- a/src/backend/commands/async.c +++ b/src/backend/commands/async.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/async.c,v 1.156 2010/04/05 00:42:24 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/async.c,v 1.157 2010/04/28 16:54:15 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -464,9 +464,6 @@ AsyncShmemInit(void) asyncQueueControl = (AsyncQueueControl *) ShmemInitStruct("Async Queue Control", size, &found); - if (!asyncQueueControl) - elog(ERROR, "out of shared memory"); - if (!found) { /* First time through, so initialize it */ -- cgit v1.2.1