* Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> [010305 14:51] wrote:
> I think we need a stronger interlock to prevent this scenario, but I'm
> unsure what it should be. Ideas?
Re having multiple postmasters active by accident.
The sysV IPC stuff has some hooks in it that may help you.
One idea is to check the 'struct shmid_ds' feild 'shm_nattch',
basically at startup if it's not 1 (or 0) then you have more than
one postgresql instance messing with it and it should not proceed.
I'd also suggest looking into using sysV semaphores and the semundo
stuff, afaik it can be used to track the number of consumers of
-Alfred Perlstein - [bright(at)wintelcom(dot)net|alfred(at)freebsd(dot)org]
In response to
pgsql-hackers by date
|Next:||From: Tom Lane||Date: 2001-03-06 01:00:58|
|Subject: pg_dump scripts are no longer ordinary-user friendly|
|Previous:||From: Thomas Swan||Date: 2001-03-05 23:19:34|
|Subject: Re: How to shoot yourself in the foot: kill -9 postmaster|