From: | Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: [PATCHES] A way to let Vacuum warn if FSM settings are low. |
Date: | 2005-02-27 20:07:03 |
Message-ID: | Pine.LNX.4.58.0502271135410.26845@greenie.cheapcomplexdevices.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-patches |
On Sun, 27 Feb 2005, Simon Riggs wrote:
> On Fri, 2005-02-25 at 16:48 -0800, Ron Mayer wrote:
> > Getting closer?
> For me, yes. [...]
> The not-warnings seem a little wordy for me, but they happen when and
> how I would hope for.
>
> So, for me, it looks like a polish of final wording and commit.
Thanks for the feedback. How about I replace the grammatically poor:
LOG: max_fsm_relations(%d) is equal than the number of relations vacuum checked (%d)",
HINT: You probably have more than %d relations. You should increase max_fsm_relations. Pages needed for
max_fsm_pages may have been underestimated.
with this:
LOG: max_fsm_relations(100) equals the number of relations checked
HINT: You have >= 100 relations. You should increase max_fsm_relations.
and replace this:
LOG: max_fsm_pages(%d) is smaller than the actual number of page slots needed(%.0f)",
HINT: You may want to increase max_fsm_pages to be larger than %.0f"
with the slightly smaller
LOG: the number of page slots needed (2832) exceeds max_fsm_pages (1601)
HINT: You may want to increase max_fsm_pages to a value over 2832.
These updated messages would fit on an 80-column display if the numbers
aren't too big. Here's 80 characters for a quick reference.
01234567890123456789012345678901234567890123456789012345678901234567890123456789
The "pages needed...underestimate" in the first message was no longer
useful anyway; since it's no longer logging fsm_pages stuff when the
max_fsm_relations condition occurred anyway
Ron
The patch now looks like:
================================================================================
% diff -u postgresql-8.0.1/src/backend/storage/freespace/freespace.c postgresql-patched/src/backend/storage/freespace/freespace.c
--- postgresql-8.0.1/src/backend/storage/freespace/freespace.c 2004-12-31 14:00:54.000000000 -0800
+++ postgresql-patched/src/backend/storage/freespace/freespace.c 2005-02-27 11:54:39.776546200 -0800
@@ -705,12 +705,25 @@
/* Convert stats to actual number of page slots needed */
needed = (sumRequests + numRels) * CHUNKPAGES;
- ereport(elevel,
- (errmsg("free space map: %d relations, %d pages stored; %.0f total pages needed",
+ ereport(INFO,
+ (errmsg("free space map: %d relations, %d pages stored; %.0f total pages used",
numRels, storedPages, needed),
- errdetail("Allocated FSM size: %d relations + %d pages = %.0f kB shared memory.",
+ errdetail("FSM size: %d relations + %d pages = %.0f kB shared memory.",
MaxFSMRelations, MaxFSMPages,
(double) FreeSpaceShmemSize() / 1024.0)));
+
+ if (numRels == MaxFSMRelations)
+ ereport(LOG,
+ (errmsg("max_fsm_relations(%d) equals the number of relations checked",
+ MaxFSMRelations),
+ errhint("You have >= %d relations. You should increase max_fsm_relations.",numRels)));
+ else
+ if (needed > MaxFSMPages)
+ ereport(LOG,
+ (errmsg("the number of page slots needed (%.0f) exceeds max_fsm_pages (%d)",
+ needed,MaxFSMPages),
+ errhint("You may want to increase max_fsm_pages to a value over %.0f.",needed)));
+
}
/*
%
================================================================================
From | Date | Subject | |
---|---|---|---|
Next Message | Brian Maguire | 2005-02-27 20:12:46 | pgpool fundamental questions |
Previous Message | Simon Riggs | 2005-02-27 19:19:46 | Re: [PATCHES] A way to let Vacuum warn if FSM settings are low. |
From | Date | Subject | |
---|---|---|---|
Next Message | Berényi Gábor | 2005-02-27 20:38:20 | Re: bcc32.mak for libpq broken? (distro 8.0.0) (fwd) |
Previous Message | Simon Riggs | 2005-02-27 19:19:46 | Re: [PATCHES] A way to let Vacuum warn if FSM settings are low. |