Re: Parsing of pg_hba.conf and authentication inconsistencies

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Parsing of pg_hba.conf and authentication inconsistencies
Дата
Msg-id
4550.1217695740@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Parsing of pg_hba.conf and authentication inconsistencies Magnus Hagander <magnus@hagander.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Tom Lane <tgl@sss.pgh.pa.us>
Re: Parsing of pg_hba.conf and authentication inconsistencies Alvaro Herrera <alvherre@commandprompt.com>
Re: Parsing of pg_hba.conf and authentication inconsistencies Tom Lane <tgl@sss.pgh.pa.us>
Re: Parsing of pg_hba.conf and authentication inconsistencies "Joshua D. Drake" <jd@commandprompt.com>
Re: Parsing of pg_hba.conf and authentication inconsistencies Alvaro Herrera <alvherre@commandprompt.com>
Re: Parsing of pg_hba.conf and authentication inconsistencies "Joshua D. Drake" <jd@commandprompt.com>
Re: Parsing of pg_hba.conf and authentication inconsistencies Tom Lane <tgl@sss.pgh.pa.us>
Re: Parsing of pg_hba.conf and authentication inconsistencies Alvaro Herrera <alvherre@commandprompt.com>
Re: Parsing of pg_hba.conf and authentication inconsistencies "Joshua D. Drake" <jd@commandprompt.com>
Re: Parsing of pg_hba.conf and authentication inconsistencies Tom Lane <tgl@sss.pgh.pa.us>
Re: Parsing of pg_hba.conf and authentication inconsistencies Magnus Hagander <magnus@hagander.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>
Re: Parsing of pg_hba.conf and authentication inconsistencies Gregory Stark <stark@enterprisedb.com>
Re: Parsing of pg_hba.conf and authentication inconsistencies Josh Berkus <josh@agliodbs.com>
Re: Parsing of pg_hba.conf and authentication inconsistencies Magnus Hagander <magnus@hagander.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Tom Lane <tgl@sss.pgh.pa.us>
Re: Parsing of pg_hba.conf and authentication inconsistencies Josh Berkus <josh@agliodbs.com>
Re: Parsing of pg_hba.conf and authentication inconsistencies Magnus Hagander <magnus@hagander.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Robert Treat <xzilla@users.sourceforge.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Tom Lane <tgl@sss.pgh.pa.us>
Re: Parsing of pg_hba.conf and authentication inconsistencies Magnus Hagander <magnus@hagander.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Stephen Frost <sfrost@snowman.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Magnus Hagander <magnus@hagander.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Stephen Frost <sfrost@snowman.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Gregory Stark <stark@enterprisedb.com>
Re: Parsing of pg_hba.conf and authentication inconsistencies Magnus Hagander <magnus@hagander.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Simon Riggs <simon@2ndquadrant.com>
Re: Parsing of pg_hba.conf and authenticationinconsistencies "korry" <korryd@enterprisedb.com>
Re: Parsing of pg_hba.conf and authenticationinconsistencies Peter Eisentraut <peter_e@gmx.net>
Re: Parsing of pg_hba.conf and authenticationinconsistencies Tom Lane <tgl@sss.pgh.pa.us>
Re: Parsing of pg_hba.conf and authenticationinconsistencies Magnus Hagander <magnus@hagander.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Stephen Frost <sfrost@snowman.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Tom Lane <tgl@sss.pgh.pa.us>
Re: Parsing of pg_hba.conf and authentication inconsistencies Magnus Hagander <magnus@hagander.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Tom Lane <tgl@sss.pgh.pa.us>
Re: Parsing of pg_hba.conf and authentication inconsistencies Magnus Hagander <magnus@hagander.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Tom Lane <tgl@sss.pgh.pa.us>
Re: Parsing of pg_hba.conf and authentication inconsistencies Magnus Hagander <magnus@hagander.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Stephen Frost <sfrost@snowman.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Magnus Hagander <magnus@hagander.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Stephen Frost <sfrost@snowman.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Magnus Hagander <magnus@hagander.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Stephen Frost <sfrost@snowman.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Magnus Hagander <magnus@hagander.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Magnus Hagander <magnus@hagander.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Bruce Momjian <bruce@momjian.us>
Re: Parsing of pg_hba.conf and authentication inconsistencies Magnus Hagander <magnus@hagander.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Bruce Momjian <bruce@momjian.us>
Re: Parsing of pg_hba.conf and authentication inconsistencies Magnus Hagander <magnus@hagander.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Tom Lane <tgl@sss.pgh.pa.us>
Re: Parsing of pg_hba.conf and authentication inconsistencies Magnus Hagander <magnus@hagander.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies "Brendan Jurd" <direvus@gmail.com>
Re: Parsing of pg_hba.conf and authentication inconsistencies "D'Arcy J.M. Cain" <darcy@druid.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Magnus Hagander <magnus@hagander.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies "Brendan Jurd" <direvus@gmail.com>
Re: Parsing of pg_hba.conf and authentication inconsistencies Tom Lane <tgl@sss.pgh.pa.us>
Re: Parsing of pg_hba.conf and authentication inconsistencies Magnus Hagander <magnus@hagander.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies "Brendan Jurd" <direvus@gmail.com>
Re: Parsing of pg_hba.conf and authentication inconsistencies Tom Lane <tgl@sss.pgh.pa.us>
Re: Parsing of pg_hba.conf and authentication inconsistencies Magnus Hagander <magnus@hagander.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Tom Lane <tgl@sss.pgh.pa.us>
Re: Parsing of pg_hba.conf and authentication inconsistencies Magnus Hagander <magnus@hagander.net>
Re: Parsing of pg_hba.conf and authentication inconsistencies Magnus Hagander <magnus@hagander.net>
Alvaro Herrera  writes:
> Tom Lane wrote:
>> Idle thought: maybe what would really make sense here is a "lint"
>> for PG config files,

> I like this idea.

> postgres --check-hba-file /path/to/hba.conf
> postgres --check-conf-file /path/to/postgresql.conf

> (I think it's better to reuse the same postmaster executable, because
> that way it's easier to have the same parsing routines.)

I'd go for just
postgres --check-config -D $PGDATA

(In a reload scenario, you'd edit the files in-place and then do this
before issuing SIGHUP.)

Reasons:

1. Easier to use: one command gets you all the checks, and you can't
accidentally forget to check the one config file that's gonna give
you problems.

2. An in-place check is the only way to be sure that, for instance,
relative-path 'include' directives are okay.

3. To implement the suggested check on role/database validity, the code
is going to need to pull in the flat-file copies of pg_database etc.
(Or try to contact a live postmaster, but that won't work when you don't
have one.)  So it needs access to $PGDATA in any case.

4. There might be usefulness in cross-checking different config files,
so examining a single one out of context just seems like the wrong
mindset.
		regards, tom lane

В списке pgsql-hackers по дате отправления
От: Magnus Hagander
Дата:
От: Tom Lane
Дата:
FAQ