Re: Question about SHM_QUEUE

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Question about SHM_QUEUE
Date: 2007-04-11 12:57:12
Message-ID: 20070411125712.GA4896@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

ITAGAKI Takahiro wrote:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> > > I have a question about SHM_QUEUE. Why do we need this component?
> > It's a hangover from Berkeley days that no one has felt a need to remove yet.
> >
> > > Then, can we replace SHM_QUEUE by a pointer-based double-linked list?
> > What exactly will you gain by it? I'm not inclined to fool with that
> > code for trivial reasons ...
>
> Hmmm, my next question is whether we should use SHM_QUEUE or not in
> new modules. The point deluded me when I wrote DSM and I wondered
> the autovacuum-multiworkers patch uses SHM_QUEUE.

Good question. I used SHM_QUEUE because I just believed the comments
that said that ShmemBase would be different on each process, and so
using plain pointers would not work. I admit I didn't even try. So if
the list can be implemented in a different way, I have no problem with
changing that code -- but then, if there's no practical problem with it
I feel uninclined to continue messing with the patch until it's
committed.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2007-04-11 13:32:43 Re: conflicting gettimeofday with MinGW
Previous Message Gregory Stark 2007-04-11 12:41:05 Re: [mux@FreeBSD.org: Re: Anyone interested in improving postgresql scaling?]