Re: 2nd update on TOAST - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: 2nd update on TOAST
Date
Msg-id 200007070204.WAA00861@candle.pha.pa.us
Whole thread Raw
In response to Re: 2nd update on TOAST  (JanWieck@t-online.de (Jan Wieck))
Responses fcntl(SETLK) [was Re: 2nd update on TOAST]  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
>     Not initdb, but postmaster. That's the one who tries (after a
>     successful initdb) to  do  the  fcntl(F_SETLK)  on  the  unix
>     domain  socket.   Causing  the  kernel saying "go to hell, go
>     directly, don't write a core,  don't  leave  useful  info  in
>     gdb".
> 
>     The  only reason I see for the entire section is to detect if
>     it would be safe to unlink the socket because  it's  left  by
>     another  postmaster  in case of abnormal termination. Tell me
>     if I've misread it.   So  why  not  doing  it  on  the  Linux
>     platform    different,    using    a   separate   file   like
>     .s.PGSQL.5432.LCK?

But how do you know if that file still belongs to an active postmaster? 
What if it exited before removing the file.  Seems we would have to
write the PID into the file, and do a kill() to see if it is running.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: update on TOAST status'
Next
From: Tom Lane
Date:
Subject: Re: Memo on coding practices: strcmp() does not yield bool