severity 388419 wishlist retitle 388419 make startup checks more elegant thanks
Hi,
Karsten Hilbert [2006-09-20 12:36 +0200]:
> local <dbname> postgres IDENT postgres-alikes
> [...]
> So configured pg_ctlcluster says
>
> WARNING: You removed the first pg_hba.conf entry that granted local
> passwordless
> access to the database superuser. Disabling startup checks.
Funny that you get this in the first place. 'IDENT' is not valid,
postmaster log complains about it:
LOG: ungültiger Eintrag in Datei »/etc/postgresql/8.2/main/pg_hba.conf« auf
Zeile 74, Token »IDENT«
FATAL: fehlende oder fehlerhafter pg_hba.conf-Datei
and I get the same when starting it:
$ sudo pg_ctlcluster 8.2 main restart
WARNING: Invalid pg_hba.conf, client connections will fail
Maybe pre-8.2 clusters accepted 'IDENT' (I didn't check), but it looks
a bit suspicious.
That's why pg_ctlcluster checks for
$firsthba{'method'} !~ /^(ident|trust)/) {
i. e. in a case-sensitive manner. If you use 'ident' instead of
'IDENT', the startup checks will be engaged, since they do not require
'sameuser'. With your current configuration and s/IDENT/ident/,
pg_ctlcluster works just fine.
However, using PGPASSWORD/PGPASSFILE is still more elegant; I'll
change this in the future.
Thanks,
Martin
--
Martin Pitt http://www.piware.de
Ubuntu Developer http://www.ubuntu.com
Debian Developer http://www.debian.org
In a world without walls and fences, who needs Windows and Gates?
signature.asc
Description: Digital signature

