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 changes). 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-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-24 14:54:36.619566040 -0800 @@ -705,12 +705,25 @@ /* Convert stats to actual number of page slots needed */ needed = (sumRequests + numRels) * CHUNKPAGES; - ereport(elevel, + ereport(INFO, (errmsg("free space map: %d relations, %d pages stored; %.0f total pages needed", numRels, storedPages, needed), errdetail("Allocated 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) 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 underestimated. ",numRels))); + else + if (needed > MaxFSMPages) + ereport(LOG, + (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 %.0f",needed))); + } ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster