Re: fcntl(SETLK) [was Re: 2nd update on TOAST]

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: pgman(at)candle(dot)pha(dot)pa(dot)us, JanWieck(at)Yahoo(dot)com, pjw(at)rhyme(dot)com(dot)au, pgsql-hackers(at)postgresql(dot)org
Subject: Re: fcntl(SETLK) [was Re: 2nd update on TOAST]
Date: 2000-07-08 13:57:32
Message-ID: 20000708225732N.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > 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.

I believe we already do this (SetPidFile() in
utils/init/miscinit.c). Isn't it sufficient (1) to prevent starting a
new postmaster on the same data dir and (2) to unlink the accidently
left socket file?
--
Tatsuo Ishii

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2000-07-08 14:09:23 Re: fcntl(SETLK) [was Re: 2nd update on TOAST]
Previous Message Philip Warner 2000-07-08 13:41:30 Re: Re: postgres TODO