From owner-freebsd-ports@FreeBSD.ORG Mon Apr 9 10:04:45 2007 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3EF1516A400; Mon, 9 Apr 2007 10:04:45 +0000 (UTC) (envelope-from girgen@pingpong.net) Received: from melon.pingpong.net (melon.pingpong.net [195.178.174.161]) by mx1.freebsd.org (Postfix) with ESMTP id F0F7F13C448; Mon, 9 Apr 2007 10:04:44 +0000 (UTC) (envelope-from girgen@pingpong.net) Received: from localhost (localhost.pingpong.net [127.0.0.1]) by melon.pingpong.net (Postfix) with ESMTP id 4D5CB5089A; Mon, 9 Apr 2007 11:47:52 +0200 (CEST) Received: from melon.pingpong.net ([127.0.0.1]) by localhost (melon.pingpong.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 73597-02-11; Mon, 9 Apr 2007 11:47:52 +0200 (CEST) Received: from [10.0.1.2] (2-1-3-26a.asp.sth.bostream.se [82.182.24.220]) by melon.pingpong.net (Postfix) with ESMTP id 649A45085A; Mon, 9 Apr 2007 11:47:51 +0200 (CEST) In-Reply-To: <20070405132429.GA72219@nowhere> References: <20070405132429.GA72219@nowhere> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <5AA20FCC-88DF-45FE-9574-F9280A2FD528@pingpong.net> Content-Transfer-Encoding: 7bit From: Palle Girgensohn Date: Mon, 9 Apr 2007 11:46:50 +0200 To: Craig Boston X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: by amavisd-new at pingpong.net Cc: girgen@FreeBSD.org, freebsd-ports@freebsd.org Subject: Re: PostgreSQL 8.x defaults X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Apr 2007 10:04:45 -0000 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