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

From: Tatsuhito Kasahara <kasahara(dot)tatsuhito(at)oss(dot)ntt(dot)co(dot)jp>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: About a message when "pg_ctl -w start" failed
Date: 2008-08-22 05:27:35
Message-ID: 48AE4E47.7040703@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)tatsuhito(at)oss(dot)ntt(dot)co(dot)jp

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Decibel! 2008-08-22 05:49:23 Re: [HACKERS] [ADMIN] shared_buffers and shmmax
Previous Message Pavel Stehule 2008-08-22 05:22:44 Re: proposal sql: labeled function params