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