|
8 | 8 | * Portions Copyright (c) 1994, Regents of the University of California |
9 | 9 | * |
10 | 10 | * IDENTIFICATION |
11 | | - * $PostgreSQL: pgsql/src/backend/storage/freespace/freespace.c,v 1.38 2005/03/12 05:21:52 momjian Exp $ |
| 11 | + * $PostgreSQL: pgsql/src/backend/storage/freespace/freespace.c,v 1.39 2005/03/14 20:15:09 momjian Exp $ |
12 | 12 | * |
13 | 13 | * |
14 | 14 | * NOTES: |
@@ -221,6 +221,8 @@ static HTAB *FreeSpaceMapRelHash;/* points to (what used to be) |
221 | 221 | * FSMHeader->relHash */ |
222 | 222 |
|
223 | 223 |
|
| 224 | +staticvoidCheckFreeSpaceMapStatistics(intelevel,intnumRels, |
| 225 | +doubleneeded); |
224 | 226 | staticFSMRelation*lookup_fsm_rel(RelFileNode*rel); |
225 | 227 | staticFSMRelation*create_fsm_rel(RelFileNode*rel); |
226 | 228 | staticvoiddelete_fsm_rel(FSMRelation*fsmrel); |
@@ -711,16 +713,24 @@ PrintFreeSpaceMapStatistics(int elevel) |
711 | 713 | errdetail("FSM size: %d relations + %d pages = %.0f kB shared memory.", |
712 | 714 | MaxFSMRelations,MaxFSMPages, |
713 | 715 | (double)FreeSpaceShmemSize() /1024.0))); |
714 | | - |
715 | | -if (numRels==MaxFSMRelations) |
716 | | -ereport(NOTICE, |
| 716 | + |
| 717 | +CheckFreeSpaceMapStatistics(NOTICE,numRels,needed); |
| 718 | +/* Print to server logs too because is deals with a config variable. */ |
| 719 | +CheckFreeSpaceMapStatistics(LOG,numRels,needed); |
| 720 | +} |
| 721 | + |
| 722 | +staticvoid |
| 723 | +CheckFreeSpaceMapStatistics(intelevel,intnumRels,doubleneeded) |
| 724 | +{ |
| 725 | +if (numRels==MaxFSMRelations) |
| 726 | +ereport(elevel, |
717 | 727 | (errmsg("max_fsm_relations(%d) equals the number of relations checked", |
718 | 728 | MaxFSMRelations), |
719 | 729 | errhint("You have >= %d relations.\n" |
720 | 730 | "Consider increasing the configuration parameter \"max_fsm_relations\".", |
721 | 731 | numRels))); |
722 | 732 | elseif (needed>MaxFSMPages) |
723 | | -ereport(NOTICE, |
| 733 | +ereport(elevel, |
724 | 734 | (errmsg("the number of page slots needed (%.0f) exceeds max_fsm_pages (%d)", |
725 | 735 | needed,MaxFSMPages), |
726 | 736 | errhint("Consider increasing the configuration parameter \"max_fsm_relations\"\n" |
|