Re: 'pg_ctl -w' times out when unix_socket_directory is

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: 'pg_ctl -w' times out when unix_socket_directory is
Дата
Msg-id 1159395161.7578.210.camel@dogma.v10.wvs
обсуждение исходный текст
Ответ на 'pg_ctl -w' times out when unix_socket_directory is set  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: 'pg_ctl -w' times out when unix_socket_directory is
Список pgsql-general
On Wed, 2006-09-27 at 14:26 -0700, Jeff Davis wrote:
> When I have "unix_socket_directory" set to an alternate value, "pg_ctl -
> D data -w start" times out. If I set it to default, it works fine.
>
> I'm using postgresql 8.1.4 on FreeBSD.
>
> Perhaps pg_ctl is waiting to see the socket file in /tmp/ before
> reporting that postgresql successfully started?
>

I took a look at the source quickly (as usual, the postgres source is so
easy to read I should have looked before I posted) and I found that the
problem seems to be in test_postmaster_connection() in pg_ctl.c.

The function checks for a non-default port, including scanning the
configuration file, but does not look for a non-default socket
directory.

It seems reasonable to add a check to find the real socket directory
before trying the connection.

I have attached a patch. I wrote it very quickly, but it seems to work
as I expect.

Regards,
    Jeff Davis

Вложения

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

Предыдущее
От: "Karen Hill"
Дата:
Сообщение: Re: cyclical redundancy checksum algorithm(s)?
Следующее
От: Lexington Luthor
Дата:
Сообщение: Re: Solution for rolling back many transactions?