From:
Alfred Perlstein <bright(at)wintelcom(dot)net>
To:
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc:
Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>, Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>,
pgsql-hackers(at)postgresql(dot)org
Subject:
Re: How to shoot yourself in the foot: kill -9 postmaster
Date:
2001-03-06 18:44:47
Message-ID:
20010306104446.O8663@fw.wintelcom.net (view raw or flat )
Thread:
2001-03-05 22:30:26 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2001-03-05 23:19:34 from Thomas Swan <tswan-lst(at)ics(dot)olemiss(dot)edu>
2001-03-05 23:47:51 from Alfred Perlstein <bright(at)wintelcom(dot)net>
2001-03-06 01:46:41 from Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
2001-03-06 01:49:01 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2001-03-06 01:52:40 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2001-03-06 01:52:13 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2001-03-06 01:55:41 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2001-03-06 02:11:38 from Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
2001-03-06 02:14:16 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2001-03-06 02:23:55 from Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
2001-03-06 02:36:28 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2001-03-06 02:45:08 from Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
2001-03-06 02:53:05 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2001-03-06 03:03:49 from Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
2001-03-06 03:10:18 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2001-03-06 03:24:11 from Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
2001-03-06 03:31:05 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2001-03-06 02:57:56 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2001-03-06 03:06:41 from Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
2001-03-06 03:08:26 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2001-03-06 03:11:56 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2001-03-06 17:04:44 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2001-03-06 17:55:54 from Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
2001-03-06 18:20:40 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2001-03-06 19:07:32 from Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
2001-03-06 16:57:48 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2001-03-06 16:54:49 from Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
2001-03-06 02:19:25 from ncm(at)zembu(dot)com (Nathan Myers)
2001-03-06 02:33:19 from Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
2001-03-06 02:19:33 from Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
2001-03-06 02:28:20 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2001-03-06 02:36:56 from Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
2001-03-06 02:40:41 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2001-03-06 02:55:11 from Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
2001-03-06 03:04:47 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2001-03-06 03:12:00 from Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
2001-03-06 03:17:36 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2001-03-06 03:27:23 from Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
2001-03-06 03:33:49 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2001-03-06 03:44:36 from Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
2001-03-06 12:30:06 from dom(at)idealx(dot)com
2001-03-06 05:43:13 from Alfred Perlstein <bright(at)wintelcom(dot)net>
2001-03-06 18:10:47 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2001-03-06 18:22:46 from Alfred Perlstein <bright(at)wintelcom(dot)net>
2001-03-06 18:35:24 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2001-03-06 18:44:47 from Alfred Perlstein <bright(at)wintelcom(dot)net>
2001-03-06 18:57:04 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2001-03-06 19:12:16 from Alfred Perlstein <bright(at)wintelcom(dot)net>
2001-03-06 19:24:54 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2001-03-06 19:34:32 from Alfred Perlstein <bright(at)wintelcom(dot)net>
2001-03-07 00:04:20 from Cyril VELTER <cyril(dot)velter(at)libertysurf(dot)fr>
2001-03-07 00:22:10 from Alfred Perlstein <bright(at)wintelcom(dot)net>
2001-03-06 19:19:12 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2001-03-06 19:27:12 from Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
2001-03-06 19:49:45 from Alfred Perlstein <bright(at)wintelcom(dot)net>
2001-03-06 19:36:26 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2001-03-06 19:54:44 from Alfred Perlstein <bright(at)wintelcom(dot)net>
2001-03-06 20:20:59 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2001-03-06 20:46:24 from ncm(at)zembu(dot)com (Nathan Myers)
2001-03-06 21:20:13 from Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
2001-03-06 22:43:05 from Alfred Perlstein <bright(at)wintelcom(dot)net>
2001-03-07 00:29:41 from Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
2001-03-07 00:58:16 from ncm(at)zembu(dot)com (Nathan Myers)
2001-03-07 01:16:18 from Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
2001-03-06 21:56:25 from Samuel Sieb <samuel(at)sieb(dot)net>
2001-03-06 22:01:48 from "Martin A(dot) Marques" <martin(at)math(dot)unl(dot)edu(dot)ar>
2001-03-08 16:43:16 from teg(at)redhat(dot)com (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=)
2001-03-07 01:50:52 from teg(at)redhat(dot)com (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=)
2001-03-07 04:38:36 from "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
Lists:
pgsql-hackers
* Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> [010306 10:35] wrote:
> Alfred Perlstein <bright(at)wintelcom(dot)net> writes:
>
> > What about encoding the shm id in the pidfile? Then one can just ask
> > how many processes are attached to that segment? (if it doesn't
> > exist, one can assume all backends have exited)
>
> Hmm ... that might actually be a pretty good idea. A small problem is
> that the shm key isn't yet selected at the time we initially create the
> lockfile, but I can't think of any reason that we could not go back and
> append the key to the lockfile afterwards.
>
> > you want the field 'shm_nattch'
>
> Are there any portability problems with relying on shm_nattch to be
> available? If not, I like this a lot...
Well it's available on FreeBSD and Solaris, I'm sure Redhat has
some deamon that resets the value to 0 periodically just for kicks
so it might not be viable... :)
Seriously, there's some dispute on the type that 'shm_nattch' is,
under Solaris it's "shmatt_t" (unsigned long afaik), under FreeBSD
it's 'short' (i should fix this. :)).
But since you're really only testing for 0'ness then it shouldn't
really be a problem.
--
-Alfred Perlstein - [bright(at)wintelcom(dot)net|alfred(at)freebsd(dot)org]
In response to
Responses
pgsql-hackers by date
Next :From: Andrew McMillanDate: 2001-03-06 18:47:45
Subject : Re: mailing list messages
Previous :From : Tom LaneDate : 2001-03-06 18:35:24
Subject : Re: How to shoot yourself in the foot: kill -9 postmaster