Postgresql Autovacuum how?
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. This is my pg_hba.conf file: # TYPE DATABASEUSERCIDR-ADDRESS METHOD # local is for Unix domain socket connections only local all all ident sameuser hostall 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? Thanks, Laszlo ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Postgresql Autovacuum how?
On Wed, 24 May 2006 09:39:41 +0200 User Gandalf [EMAIL PROTECTED] 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 DATABASEUSERCIDR-ADDRESS METHOD # local is for Unix domain socket connections only local all all ident sameuser hostall 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: [EMAIL PROTECTED] Web: http://www.nickwithers.com Mobile: +61 414 397 446 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Postgresql Autovacuum how?
Nick Withers írta: 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 is a broken link (for me at least). _ (...) 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. Thank you, I'll try this. _ This is my pg_hba.conf file: # TYPE DATABASEUSERCIDR-ADDRESS METHOD # local is for Unix domain socket connections only local all all ident sameuser hostall 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? Ident sameuser means that the user will be identified with the IDENT protocol. Then if the unix user name matches a postgresql user name, the user can connect without providing the password. Without giving 'sameuser', the unix and postgresql user names will be matched through pg_ident.conf. (I think I'm offtopic here, sorry) Best, Laci ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Postgresql Autovacuum how?
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: That link is broken, but here is a good one: http://www.postgresql.org/docs/8.1/interactive/libpq-pgpass.html I had to put in into ~pgsql/.pgpass. However, for other users, it works for me ONLY if the database name and the user name are the same. Otherwise it prompts for a password. But that is antoher problem. Thanks, Laci ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]