From: | Alfred Perlstein <bright(at)wintelcom(dot)net> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Mike Mascari <mascarm(at)mascari(dot)com>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, PostgreSQL HACKERS <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: fcntl(SETLK) [was Re: 2nd update on TOAST] |
Date: | 2000-07-08 13:28:00 |
Message-ID: | 20000708062800.F25571@fw.wintelcom.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
* Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> [000708 06:02] wrote:
> > > my $pgsocket = "/tmp/.s.PGSQL.5432";
> > >
> > > # try to connect to the postmaster
> > > socket(SOCK, PF_UNIX, SOCK_STREAM, 0)
> > > or die "unable to create unix domain socket: $!";
> > >
> > > connect(SOCK, sockaddr_un($pgsocket))
> > > and errexit("postmaster is running you must shut it down");
> > >
> > > oh yeah... :)
> > >
> > > -Alfred
> >
> > I don't get this. Isn't there a race condition here?
>
> That's a good point. I don't think so because the socket will only
> create for one user. Basically, we don't need something bulletproof
> here. We just need something to prevent admins from accidentally
> starting two postmasters on the same port.
Actually I just remebered the issue here, if one wants to start
postmaster on an alternate port there will be no conflict and
all hell may break loose.
-Alfred
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2000-07-08 13:40:07 | Re: fcntl(SETLK) [was Re: 2nd update on TOAST] |
Previous Message | Bruce Momjian | 2000-07-08 13:14:36 | Re: postgres TODO |