Skip to content

Commit 4590542

Browse files
committed
Add warning about the need to increase "max_fsm_relations" and
"max_fsm_relations" for vacuums. Also improve VACUUM VERBOSE final message text. Ron Mayer
1 parent c82f76e commit 4590542

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

src/backend/storage/freespace/freespace.c

Lines changed: 17 additions & 3 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.37 2004/12/31 22:00:54 pgsql Exp $
11+
* $PostgreSQL: pgsql/src/backend/storage/freespace/freespace.c,v 1.38 2005/03/12 05:21:52 momjian Exp $
1212
*
1313
*
1414
* NOTES:
@@ -706,11 +706,25 @@ PrintFreeSpaceMapStatistics(int elevel)
706706
needed = (sumRequests + numRels) * CHUNKPAGES;
707707

708708
ereport(elevel,
709-
(errmsg("free space map: %d relations, %d pages stored; %.0f total pages needed",
709+
(errmsg("free space map: %d relations, %d pages stored; %.0f total pages used",
710710
numRels, storedPages, needed),
711-
errdetail("Allocated FSM size: %d relations + %d pages = %.0f kB shared memory.",
711+
errdetail("FSM size: %d relations + %d pages = %.0f kB shared memory.",
712712
MaxFSMRelations, MaxFSMPages,
713713
(double) FreeSpaceShmemSize() / 1024.0)));
714+
715+
if (numRels == MaxFSMRelations)
716+
ereport(NOTICE,
717+
(errmsg("max_fsm_relations(%d) equals the number of relations checked",
718+
MaxFSMRelations),
719+
errhint("You have >= %d relations.\n"
720+
"Consider increasing the configuration parameter \"max_fsm_relations\".",
721+
numRels)));
722+
else if (needed > MaxFSMPages)
723+
ereport(NOTICE,
724+
(errmsg("the number of page slots needed (%.0f) exceeds max_fsm_pages (%d)",
725+
needed,MaxFSMPages),
726+
errhint("Consider increasing the configuration parameter \"max_fsm_relations\"\n"
727+
"to a value over %.0f.", needed)));
714728
}
715729

716730
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy