|
13 | 13 | * |
14 | 14 | * Copyright (c) 2001-2005, PostgreSQL Global Development Group |
15 | 15 | * |
16 | | - * $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.94 2005/05/11 01:41:40 neilc Exp $ |
| 16 | + * $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.95 2005/05/29 04:23:03 tgl Exp $ |
17 | 17 | * ---------- |
18 | 18 | */ |
19 | 19 | #include "postgres.h" |
@@ -2061,10 +2061,6 @@ pgstat_get_db_entry(int databaseid) |
2061 | 2061 | result = (PgStat_StatDBEntry *) hash_search(pgStatDBHash, |
2062 | 2062 | &databaseid, |
2063 | 2063 | HASH_ENTER, &found); |
2064 | | - if (result == NULL) |
2065 | | - ereport(ERROR, |
2066 | | - (errcode(ERRCODE_OUT_OF_MEMORY), |
2067 | | - errmsg("out of memory in statistics collector --- abort"))); |
2068 | 2064 |
|
2069 | 2065 | /* If not found, initialize the new one. */ |
2070 | 2066 | if (!found) |
@@ -2126,10 +2122,6 @@ pgstat_sub_backend(int procpid) |
2126 | 2122 | (void *) &procpid, |
2127 | 2123 | HASH_ENTER, |
2128 | 2124 | &found); |
2129 | | - if (deadbe == NULL) |
2130 | | - ereport(ERROR, |
2131 | | - (errcode(ERRCODE_OUT_OF_MEMORY), |
2132 | | - errmsg("out of memory in statistics collector --- abort"))); |
2133 | 2125 |
|
2134 | 2126 | if (!found) |
2135 | 2127 | { |
@@ -2435,12 +2427,6 @@ pgstat_read_statsfile(HTAB **dbhash, Oid onlydb, |
2435 | 2427 | (void *) &dbbuf.databaseid, |
2436 | 2428 | HASH_ENTER, |
2437 | 2429 | &found); |
2438 | | - if (dbentry == NULL) |
2439 | | - { |
2440 | | - ereport(ERROR, |
2441 | | - (errcode(ERRCODE_OUT_OF_MEMORY), |
2442 | | - errmsg("out of memory"))); |
2443 | | - } |
2444 | 2430 | if (found) |
2445 | 2431 | { |
2446 | 2432 | ereport(pgStatRunningInCollector ? LOG : WARNING, |
@@ -2503,10 +2489,6 @@ pgstat_read_statsfile(HTAB **dbhash, Oid onlydb, |
2503 | 2489 | tabentry = (PgStat_StatTabEntry *) hash_search(tabhash, |
2504 | 2490 | (void *) &tabbuf.tableid, |
2505 | 2491 | HASH_ENTER, &found); |
2506 | | - if (tabentry == NULL) |
2507 | | - ereport(ERROR, |
2508 | | - (errcode(ERRCODE_OUT_OF_MEMORY), |
2509 | | - errmsg("out of memory"))); |
2510 | 2492 |
|
2511 | 2493 | if (found) |
2512 | 2494 | { |
@@ -2730,10 +2712,6 @@ pgstat_recv_tabstat(PgStat_MsgTabstat *msg, int len) |
2730 | 2712 | tabentry = (PgStat_StatTabEntry *) hash_search(dbentry->tables, |
2731 | 2713 | (void *) &(tabmsg[i].t_id), |
2732 | 2714 | HASH_ENTER, &found); |
2733 | | - if (tabentry == NULL) |
2734 | | - ereport(ERROR, |
2735 | | - (errcode(ERRCODE_OUT_OF_MEMORY), |
2736 | | - errmsg("out of memory in statistics collector --- abort"))); |
2737 | 2715 |
|
2738 | 2716 | if (!found) |
2739 | 2717 | { |
|
0 commit comments