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/postmaster/autovacuum.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/backend/postmaster/autovacuum.c') diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c index 8de6d878dd..78f0667271 100644 --- a/src/backend/postmaster/autovacuum.c +++ b/src/backend/postmaster/autovacuum.c @@ -55,7 +55,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.109 2010/02/26 02:00:55 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.110 2010/04/28 16:54:15 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -2771,10 +2771,6 @@ AutoVacuumShmemInit(void) ShmemInitStruct("AutoVacuum Data", AutoVacuumShmemSize(), &found); - if (AutoVacuumShmem == NULL) - ereport(FATAL, - (errcode(ERRCODE_OUT_OF_MEMORY), - errmsg("not enough shared memory for autovacuum"))); if (!IsUnderPostmaster) { -- cgit v1.2.1