Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2c4dea1

Browse files
committed
Issue free space notices to both the user and the server log file.
1 parent28bcc34 commit2c4dea1

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

‎src/backend/storage/freespace/freespace.c

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
1010
* 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 $
1212
*
1313
*
1414
* NOTES:
@@ -221,6 +221,8 @@ static HTAB *FreeSpaceMapRelHash;/* points to (what used to be)
221221
* FSMHeader->relHash */
222222

223223

224+
staticvoidCheckFreeSpaceMapStatistics(intelevel,intnumRels,
225+
doubleneeded);
224226
staticFSMRelation*lookup_fsm_rel(RelFileNode*rel);
225227
staticFSMRelation*create_fsm_rel(RelFileNode*rel);
226228
staticvoiddelete_fsm_rel(FSMRelation*fsmrel);
@@ -711,16 +713,24 @@ PrintFreeSpaceMapStatistics(int elevel)
711713
errdetail("FSM size: %d relations + %d pages = %.0f kB shared memory.",
712714
MaxFSMRelations,MaxFSMPages,
713715
(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,
717727
(errmsg("max_fsm_relations(%d) equals the number of relations checked",
718728
MaxFSMRelations),
719729
errhint("You have >= %d relations.\n"
720730
"Consider increasing the configuration parameter \"max_fsm_relations\".",
721731
numRels)));
722732
elseif (needed>MaxFSMPages)
723-
ereport(NOTICE,
733+
ereport(elevel,
724734
(errmsg("the number of page slots needed (%.0f) exceeds max_fsm_pages (%d)",
725735
needed,MaxFSMPages),
726736
errhint("Consider increasing the configuration parameter \"max_fsm_relations\"\n"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp