Re: About a message when "pg_ctl -w start" failed

Поиск
Список
Период
Сортировка
От Tatsuhito Kasahara
Тема Re: About a message when "pg_ctl -w start" failed
Дата
Msg-id 48AE4E47.7040703@oss.ntt.co.jp
обсуждение исходный текст
Ответ на Re: About a message when "pg_ctl -w start" failed  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi, thanks for your reply.

Tom Lane wrote:
>> If a user who perform "pg_ctl -w start" does not have authority to connect
>> postgres-database, pg_ctl will return 1 and show "could not start server" message.
>
> You didn't say what auth method you are using
The problem that I showed occurs in following case for example.

1. user_1$ initdb -D /tmp/test
2. user_1$ sudo chown -R user_2:user_2 /tmp/test
3. user_2$ pg_ctl -D /tmp/test -w start  <-- problem occurs!
(Because, there is no role for user_2 in "/tmp/test". But server starting.)

> I'd think the right fix is to make it recognize other types of
> authentication failures as well.
Yes, I agree.
I think role and database(postgres) existence check is necessary before
starting postmaster.
# Or improve the connection test way in test_postmaster_connection().

Best regards,
-- 
Tatsuhito Kasahara
kasahara.tatsuhito@oss.ntt.co.jp


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

Предыдущее
От: "Pavel Stehule"
Дата:
Сообщение: Re: proposal sql: labeled function params
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Proposal: new border setting in psql