From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Jeff Davis <list-pgsql-hackers(at)empires(dot)org>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: listen/notify argument (old topic revisited) |
Date: | 2002-07-02 21:12:48 |
Message-ID: | 200207022112.g62LCm423264@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Of course, a shared memory system probably is going to either do it
> > sequentailly or have its own index issues, so I don't see a huge
> > advantage to going to shared memory, and I do see extra code and a queue
> > limit.
>
> Disk I/O vs. no disk I/O isn't a huge advantage? Come now.
My assumption is that it throws to disk as backing store, which seems
better to me than dropping the notifies. Is disk i/o a real performance
penalty for notify, and is performance a huge issue for notify anyway,
assuming autovacuum?
> A shared memory system would use sequential (well, actually
> circular-buffer) access, which is *exactly* what you want given
> the inherently sequential nature of the messages. The reason that
> table storage hurts is that we are forced to do searches, which we
> could eliminate if we had control of the storage ordering. Again,
> it comes down to the fact that tables don't provide the right
> abstraction for this purpose.
To me, it just seems like going to shared memory is taking our existing
table structure and moving it to memory. Yea, there is no tuple header,
and yea we can make a circular list, but we can't index the thing, so is
spinning around a circular list any better than a sequential scan of a
table. Yea, we can delete stuff better, but autovacuum would help with
that. It just seems like we are reinventing the wheel.
Are there other uses for this? Can we make use of RAM-only tables?
> The "extra code" argument doesn't impress me either; async.c is
> currently 900 lines, about 2.5 times the size of sinvaladt.c which is
> the guts of SI message passing. I think it's a good bet that a SI-like
> notify module would be much smaller than async.c is now; it's certainly
> unlikely to be significantly larger.
>
> The queue limit problem is a valid argument, but it's the only valid
> complaint IMHO; and it seems a reasonable tradeoff to make for the
> other advantages.
I am just not excited about it. What do others think?
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-07-02 21:35:42 | Re: listen/notify argument (old topic revisited) |
Previous Message | Tom Lane | 2002-07-02 20:07:12 | Re: listen/notify argument (old topic revisited) |