Alvaro Herrera wrote:
> Bruce Momjian wrote:
> >
> > I applied the optional VACUUM FULL version, but modified to code to say
> > 20% rather than a factor of 5, attached.
>
> String construction does not work well with translations; please
> reformulate this.
>
> > + errhint("Consider%sincreasing the
> > configuration parameter \"max_fsm_pages\".",
> > + /* Only suggest VACUUM FULL if
> > 20% free */
> > + (vacrelstats->tot_free_pages >
> > vacrelstats->rel_pages * 0.20
> > + ? " using VACUUM FULL
> > on this relation or ": " "))));
OK, updated.
--
Bruce Momjian <[EMAIL PROTECTED]> http://momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Index: src/backend/commands/vacuumlazy.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/commands/vacuumlazy.c,v
retrieving revision 1.84
diff -c -c -r1.84 vacuumlazy.c
*** src/backend/commands/vacuumlazy.c 21 Feb 2007 22:15:21 -0000 1.84
--- src/backend/commands/vacuumlazy.c 21 Feb 2007 22:41:55 -0000
***************
*** 185,194 ****
(errmsg("relation \"%s.%s\" contains more than \"max_fsm_pages\" pages with useful free space",
get_namespace_name(RelationGetNamespace(onerel)),
RelationGetRelationName(onerel)),
! errhint("Consider%sincreasing the configuration parameter \"max_fsm_pages\".",
! /* Only suggest VACUUM FULL if 20% free */
! (vacrelstats->tot_free_pages > vacrelstats->rel_pages * 0.20
! ? " using VACUUM FULL on this relation or ": " "))));
/* Update statistics in pg_class */
vac_update_relstats(RelationGetRelid(onerel),
--- 185,194 ----
(errmsg("relation \"%s.%s\" contains more than \"max_fsm_pages\" pages with useful free space",
get_namespace_name(RelationGetNamespace(onerel)),
RelationGetRelationName(onerel)),
! errhint((vacrelstats->tot_free_pages > vacrelstats->rel_pages * 0.20 ?
! /* Only suggest VACUUM FULL if 20% free */
! "Consider using VACUUM FULL on this relation or increasing the configuration parameter \"max_fsm_pages\"." :
! "Consider increasing the configuration parameter \"max_fsm_pages\"."))));
/* Update statistics in pg_class */
vac_update_relstats(RelationGetRelid(onerel),
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend