Re: [PATCHES] Reorganization of spinlock defines

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] Reorganization of spinlock defines
Date: 2003-09-12 13:59:41
Message-ID: 200309121359.h8CDxfw12172@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Marc G. Fournier wrote:
>
>
> On Fri, 12 Sep 2003, Tom Lane wrote:
>
> > "Marc G. Fournier" <scrappy(at)postgresql(dot)org> writes:
> > >> If we force people to give a --without-spinlocks config option to build
> > >> that way, then `pg_config --configure' will reveal the dirty deed ...
> >
> > > That's not quite what I meant :) Right now, if I understood what Bruce
> > > was saying, if someone doesn't have spinlocks, it switches to using SysV
> > > Messenging, correct? In the current system, is there anything that one
> > > can do on a running, live system, to detect that you aren't using
> > > spinlocks?
> >
> > It'll be fairly obvious if you use "ipcs -s" and count up the number of
> > semaphores created by the postmaster. Ordinarily we will grab
> > approximately max_connections semas, but without spinlocks it will
> > be somewhere north of max_connections + 2 * shared_buffers ...
>
> 'K, now, I know we acquire all our shared_buffers on startup now ... do we
> do the same with semaphores? Or do they only grow as connections grow?
> If we do acquire at the start, would it not be trivial to add a message to
> the startup messages, based on #_of_semaphores != max_connections, that
> tells ppl that spinlocks aren't being used?

But why not warn at compile time.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jon Jensen 2003-09-12 14:00:03 Re: massive quotes?
Previous Message Marc G. Fournier 2003-09-12 13:57:42 Re: [PATCHES] Reorganization of spinlock defines

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-09-12 14:33:40 Re: [PATCHES] Reorganization of spinlock defines
Previous Message Marc G. Fournier 2003-09-12 13:57:42 Re: [PATCHES] Reorganization of spinlock defines