Re: initdb failure with PostgreSQL 7.3.2 / Cygwin 1.3.22-1 /

Поиск
Список
Период
Сортировка
От Jason Tishler
Тема Re: initdb failure with PostgreSQL 7.3.2 / Cygwin 1.3.22-1 /
Дата
Msg-id 20030502115828.GA1404@tishler.net
обсуждение исходный текст
Ответ на Re: initdb failure with PostgreSQL 7.3.2 / Cygwin 1.3.22-1 /  (Frank Seesink <frank@mail.wvnet.edu>)
Ответы Re: initdb failure with PostgreSQL 7.3.2 / Cygwin 1.3.22-1 /  (Frank Seesink <frank@mail.wvnet.edu>)
Re: initdb failure with PostgreSQL 7.3.2 / Cygwin 1.3.22-1 /  (Frank Seesink <frank@mail.wvnet.edu>)
Список pgsql-cygwin
Frank,

On Thu, May 01, 2003 at 10:21:14AM -0400, Frank Seesink wrote:
> Jason Tishler wrote:
> ...
> >Let's try another approach.  Please strace "ipctest s" when run under
> >the postgres:
> >
> >    $ strace -o ipctest.log ipctest s
>
> As requested, attached here is ipctest.log, run as user 'postgres'
> after making sure ipc-daemon was started.

Your strace (i.e., ipctest-frank.log) yields the following:

    $ fgrep 'errno 88' ipctest-frank.log
       67   46182 [main] ... writev: 27 = write (1, 0x22FBA0, 1), errno 88
       53   46505 [main] ... writev: 7 = write (2, 0x22FBA0, 1), errno 88
       58   46837 [main] ... writev: 2 = write (2, 0x22FBA0, 1), errno 88
       60   47264 [main] ... writev: 24 = write (2, 0x22FBA0, 1), errno 88
       53   47586 [main] ... writev: 1 = write (2, 0x22FBE0, 1), errno 88

My strace with ipc-daemon running yields the following:

    $ ps -ef | fgrep ipc-daemon
      system    2264       1   ?  07:29:28 /usr/local/bin/ipc-daemon
    $ strace ipctest s | fgrep 'errno 88'
    $

My strace without ipc-daemon running yields the following:

    $ ps -ef | fgrep ipc-daemon
    $ strace ipctest s 2>/dev/null | fgrep 'errno 88'
      152   37428 [main] ... writev: 7 = write (2, 0x22FBA0, 1), errno 88
       76   37739 [main] ... writev: 2 = write (2, 0x22FBA0, 1), errno 88
       75   38151 [main] ... writev: 24 = write (2, 0x22FBA0, 1), errno 88
      106   38485 [main] ... writev: 1 = write (2, 0x22FBE0, 1), errno 88
       75   38799 [main] ... writev: 38 = write (1, 0x22FE18, 1), errno 88

Hence, your strace is very similar to what I get when ipc-daemon is
*not* running.

My WAG from the above is that for some reason the following cygipc code
is failing on your XP Pro SP1 setup:

static int IsGSemSemExist()
{
    GSemSem = OpenSemaphore(SEMAPHORE_ALL_ACCESS, FALSE, CYGWIN_IPCNT_SEMSEM);
    if( GSemSem != NULL )
    {
        return (1) ;
    } else {
        return (0) ;
    }
}

Please run the attached program under both the Frank and postgres user
accounts to confirm or refute the above hypothesis and report back to
the list.

BTW, I just thought of a potential workaround.  What happens if you run
ipc-daemon under the postgres account.  Does "ipctest s" under postgres
work?  Does initdb work?  Remember to delete the /tmp files created by
ipc-daemon before trying.

Thanks,
Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

Вложения

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

Предыдущее
От: Frank Seesink
Дата:
Сообщение: Re: initdb failure with PostgreSQL 7.3.2 / Cygwin 1.3.22-1 /
Следующее
От: Frank Seesink
Дата:
Сообщение: Re: initdb failure with PostgreSQL 7.3.2 / Cygwin 1.3.22-1 /