From: | Dan Holmsand <dan(at)eyebee(dot)com> |
---|---|
To: | pgsql-cygwin(at)postgresql(dot)org |
Subject: | Re: Initdb fails... Again! |
Date: | 2003-01-22 22:05:39 |
Message-ID: | b0n4j3$8ru$1@main.gmane.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-cygwin |
Markko and Jason,
Jason Tishler wrote:
> On Wed, Jan 22, 2003 at 04:38:37PM +0200, Markko Paas wrote:
>
>>It seems I have worked around the problem, "ipctest s" started working
>>"out of blue", when I had ipc-daemon running background. Running as
>>service didn't help as it was mentioned in previus postings.
>>
>>After that, initdb went ok. Then I killed the background ipc-daemon.
>>Postmaster seems to be happy with ipc-daemon's service version.
>
>
> Hmm...I recommend getting to the bottom of this because it may stop
> working "out of blue" sometime in the future.
I had a very similar experience: sometimes postgres started, sometimes not.
It turned out that the "postgres" user must have write permissions to
/tmp/MultiFileSem, otherwise both postgres and ipctest fails (when run
from the postgres account).
ipc-daemon creates this file with -rw-r--r-- permissions on my machine.
That means that if ipc-daemon is run from the postgres account when this
file is missing, it will be writable by postgres and all is fine (even
if ipc-daemon is later run as, say, SYSTEM or root by cygrunsrv).
However, if /tmp/MultiFileSem isn't around when ipc-daemon is run as a
service, a new file will be created that is owned by SYSTEM, and hence
not writable by postgres.
So the solution is to either say
chmod a+w /tmp/MultiFileSem
or
chown postgres /tmp/MultiFileSem
before starting postmaster. Probably not a brilliant solution, security
wise, but the only solution I've found.
/dan
From | Date | Subject | |
---|---|---|---|
Next Message | Cheah Ai Meng | 2003-01-23 08:38:05 | Re: Problem with PostgreSQL: unable to connect to database |
Previous Message | Jason Tishler | 2003-01-22 20:55:02 | Re: Postgres 7.3.1 on Windows XP Home / Professional |