Re: Getting rid of the flat authentication file

Поиск
Список
Период
Сортировка
От Joshua D. Drake
Тема Re: Getting rid of the flat authentication file
Дата
Msg-id 1251475471.27122.31.camel@jd-desktop.unknown.charter.com
обсуждение исходный текст
Ответ на Re: Getting rid of the flat authentication file  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Getting rid of the flat authentication file  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, 2009-08-28 at 11:52 -0400, Tom Lane wrote:

> I've thought of an easier way to handle this: if the given database name
> is invalid, connect to database "postgres" instead, and perform
> authentication using normal access to the pg_auth catalogs.  If
> authentication succeeds, *then* throw the error about nonexistent
> database.  If "postgres" is not there, we'd still expose existence
> of the original database name early, but how many installations don't
> have that?

I run into it all the time. People drop the postgres database as not
needed.

>  (I thought about trying template1 and/or template0 as
> fallbacks, but that's probably not a good thing.  Backends that are
> waiting on a client for authentication would pose a DOS problem for
> sessions trying to do CREATE DATABASE, if they're connected to those.)

What if there was a silent database, say pg_authdb. That isn't even
visible under normal circumstances (need to be in single user mode)?

Alternatively just make it so the postgres database can't be dropped.

ERROR: The database postgres is a system database. It can not be
dropped.

Joshua D. Drake

--
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 503.667.4564
Consulting, Training, Support, Custom Development, Engineering

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: [PATCH] Largeobject access controls
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Getting rid of the flat authentication file