Re: How to shoot yourself in the foot: kill -9 postmaster

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alfred Perlstein <bright(at)wintelcom(dot)net>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, 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 20:20:59
Message-ID: 7350.983910059@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alfred Perlstein <bright(at)wintelcom(dot)net> writes:
> Of course not, the size of the struct changed (short->unsigned
> long, basically int16_t -> uint32_t), because the kernel and userland
> in Linux are hardly in sync you have the fun of guessing if you
> get:

> old struct -> old syscall (ok)
> new struct -> old syscall (boom)
> old struct -> new syscall (boom)
> new struct -> new syscall (ok)

Ugh. However, it looks like it might be fairly fail-soft: if we
have the wrong declaration then we pick up some other field of the
struct, and probably end up complaining because nattch appears nonzero.
Recovery method (clean up the shm seg or delete lockfile) is the same.

I'm still inclined to go with this; it beats corrupting the WAL log,
and the fcntl(SETLK) alternative has its own set of portability
booby-traps.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2001-03-06 20:39:13 Re: epoch
Previous Message Alfred Perlstein 2001-03-06 19:54:44 Re: How to shoot yourself in the foot: kill -9 postmaster