Date: Mon, 9 Apr 2007 11:46:50 +0200 From: Palle Girgensohn <girgen@pingpong.net> To: Craig Boston <craig@yekse.gank.org> Cc: girgen@FreeBSD.org, freebsd-ports@freebsd.org Subject: Re: PostgreSQL 8.x defaults Message-ID: <5AA20FCC-88DF-45FE-9574-F9280A2FD528@pingpong.net> In-Reply-To: <20070405132429.GA72219@nowhere> References: <20070405132429.GA72219@nowhere>
next in thread | previous in thread | raw e-mail | index | archive | help
5 apr 2007 kl. 15.24 skrev Craig Boston: > I recently installed some PostgreSQL 8.2 servers (and upgraded some > from > 8.1), and it reminded me of a few lingering nits in our port that bug > me. Mostly the port seems that it can't make up its mind about VACCUM > strategy. > > * We have a patch that sets autovacuum = yes in the default > postgresql.conf. However, it leaves the default stats_row_level > = no, > so autovacuum doesn't actually run. Hi, I've checked it out. Seems I have indeed missed the stats_row_level... I'll fix this! > * Despite trying to turn on autovacuum, the port installs > periodic/daily/502.pgsql, which runs VACUUM (not even VACUUM > ANALYZE) > by default nightly. It does run vaccumdb -aqz per default, where -z is for analyze: $ grep daily_pgsql_vacuum_args files/502.pgsql daily_pgsql_vacuum_args="-z" su -l pgsql -c "vacuumdb -a -q ${daily_pgsql_vacuum_args}" > > It seems to me that we should pick one or the other -- either > > 1. Fully enable autovacuum and default to > daily_pgsql_vacuum_enable="NO" > to avoid a superfluous cron job > > or > > 2. Leave the periodic job enabled and not tease people with an > ineffectual autovacuum = yes in postgresql.conf. > > Of the two I'd prefer the former, but that's just my opinion. About the two "strategies" you present; autovacuum will probably need some tweaking for most applications, since it will not perform vacuums unless a certain percentage of the tuples are changed. Hence, usually I use a combination of autovacuum and a nightly vacuumdb -za. For smaller installations, the vanilla setup could of course be either of your suggestions, or my just suggested combo, it is probably a matter of taste. I'd prefer you #1 or the combo... I'll think about it a bit more, and will fix the port. :) Happy easter, Palle
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5AA20FCC-88DF-45FE-9574-F9280A2FD528>