From owner-freebsd-questions@FreeBSD.ORG Wed May 24 07:50:33 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2281616A5CC for ; Wed, 24 May 2006 07:50:33 +0000 (UTC) (envelope-from nick@nickwithers.com) Received: from mail.nickwithers.com (mail.manrags.com [203.219.206.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id B364D43D53 for ; Wed, 24 May 2006 07:50:30 +0000 (GMT) (envelope-from nick@nickwithers.com) Received: from localhost (shmick.shmon.net [10.0.0.252]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.nickwithers.com (Postfix) with ESMTP id E57793A81D; Wed, 24 May 2006 17:50:20 +1000 (EST) Date: Wed, 24 May 2006 17:50:20 +1000 From: Nick Withers To: User Gandalf Message-Id: <20060524175020.9f54dfae.nick@nickwithers.com> In-Reply-To: <44740DBD.1090303@messias.qhigh.com> References: <44740DBD.1090303@messias.qhigh.com> Organization: nickwithers.com X-Mailer: Sylpheed version 2.2.4 (GTK+ 2.8.17; i386-portbld-freebsd6.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-nickwithers-MailScanner: Found to be clean X-nickwithers-MailScanner-From: nick@nickwithers.com Cc: freebsd-questions@freebsd.org Subject: Re: Postgresql Autovacuum how? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2006 07:50:34 -0000 On Wed, 24 May 2006 09:39:41 +0200 User Gandalf wrote: > > Hello, > > I have FreeBSD 6.1 and PostgreSQL 8.1.3 installed. I had to change the > pg_hba.conf settings, because I need to open the 5432 port for everyone > (SSL enabled). For this reason, I also gave strong passwords for all > postgresql users. Now this is what I see in the daily run output > (/usr/local/etc/periodic/daily/502.pgsql): > > vacuuming... > Password: > vacuumdb: could not connect to database postgres: fe_sendauth: no password supplied > > Errors were reported during vacuum. I've created a .pgpass file in /root (which is read only by root) containing the password for the pgsql user. A quick Google on "pgpass" turned up this content from http://pgsqld.active-venture.com/libpq-files.html: _____ (...) This file should have the format: hostname:port:database:username:password Any of these may be a literal name, or *, which matches anything. The first match will be used so put more specific entries first. Entries with : or \ should be escaped with \. The permissions on .pgpass must disallow any access to world or group; achieve this by the command chmod 0600 .pgaccess. If the permissions are less strict than this, the file will be ignored. _____ > This is my pg_hba.conf file: > > # TYPE DATABASE USER CIDR-ADDRESS METHOD > # "local" is for Unix domain socket connections only > local all all ident sameuser > host all all 127.0.0.1/32 md5 > hostssl all all 0.0.0.0 0.0.0.0 md5 > > The autovacuum script was packaged for FreeBSD, so I assume this is a > FreeBSD specific thing. My question is: why ident/sameuser not working > here? How can I enable auto vacuums without storing the password in the > periodic/daily/502.pgsql script? I'm not familiar with the "sameuser" directive, presumably this prohibits a system user from logging in as a user in the database with a different name? If this is the case, I don't imagine the solution I've described above will help resolve this issue. -- Nick Withers email: nick@nickwithers.com Web: http://www.nickwithers.com Mobile: +61 414 397 446