On Thu, 24 Feb 2005, Tom Lane wrote:
> I'd go for making them both LOG, I think. More consistent.
Ok, here's another try :) With a couple more questions...
1. If I read Simon's email correctly, it implied that he wanted to see
the "free space map" message for a VACUUM even when VERBOSE is turned off.
I could just tweak it in PrintFreeSpaceMapStastics() as shown here...
but now elevel (which depended on VACUUM VERBOSE or not) is no longer
needed by PrintFreeSpaceMapStastics.
1a. Is that desired to always show this line as an INFO instead of
a DEBUG2 (which it currently is when VERBOSE is not selected)?
1b. Should I tweak vacuum.c (feels cleaner) or just freespace.c (minimal
2. If I read Simon's email correctly, it implied that he wanted to see
these new lines when you type VACUUM. This would suggest making
them INFOs. Making them INFOs would slightly contradict another
goal of wanting to see them in the LOG for automated log
grepping scripts to find, since that would require turning on INFOs
that I think commonly aren't logged. Also making them LOGs is
consistent with the checkpoint hint. I suppose they could be
made NOTICEs; but that isn't consistent with either.
diff -u postgresql-8.0.1/src/backend/storage/freespace/freespace.c
--- postgresql-8.0.1/src/backend/storage/freespace/freespace.c 2004-12-31
+++ postgresql-patched/src/backend/storage/freespace/freespace.c 2005-02-24
@@ -705,12 +705,25 @@
/* Convert stats to actual number of page slots needed */
needed = (sumRequests + numRels) * CHUNKPAGES;
(errmsg("free space map: %d relations, %d pages stored; %.0f total
numRels, storedPages, needed),
errdetail("Allocated FSM size: %d relations + %d pages = %.0f kB
(double) FreeSpaceShmemSize() / 1024.0)));
+ if (numRels == MaxFSMRelations)
+ (errmsg("max_fsm_relations(%d) is equal than the number of
relations vacuum checked (%d)",
+ MaxFSMRelations, numRels),
+ errhint("You probably have more than %d relations. You should
increase max_fsm_relations. Pages needed for max_fsm_pages may have been
+ if (needed > MaxFSMPages)
+ (errmsg("max_fsm_pages(%d) is smaller than the actual number of
page slots needed(%.0f)",
+ MaxFSMPages, needed),
+ errhint("You may want to increase max_fsm_pages to be larger than
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]