Re: Synchronized Scan update

From: Hannu Krosing <hannu(at)skype(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Synchronized Scan update
Date: 2007-03-13 17:31:11
Message-ID: 1173807071.4903.7.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ühel kenal päeval, T, 2007-03-13 kell 12:53, kirjutas Tom Lane:
> Jeff Davis <pgsql(at)j-davis(dot)com> writes:
> > I agree that ss_report_loc() doesn't need to report on every call. If
> > there's any significant overhead I agree that it should report less
> > often. Do you think that the overhead is significant on such a simple
> > function?
>
> One extra LWLock cycle per page processed definitely *is* a significant
> overhead ... can you say "context swap storm"? I'd think about doing it
> once every 100 or so pages.

Can't we do it in some lock-free way ? writing page numbers (4-byte
ints) into a predetermined location isn shared mem should be atomic on
all platforms we support (still may cause some cache ping-pong in
multiprocessor systems, but this should be much cheaper), and even an
occasional error in establishing the "scan head" should not be
catastrophic.

--
----------------
Hannu Krosing
Database Architect
Skype Technologies OÜ
Akadeemia tee 21 F, Tallinn, 12618, Estonia

Skype me: callto:hkrosing
Get Skype for free: http://www.skype.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2007-03-13 17:34:32 Re: My honours project - databases using dynamically attached entity-properties
Previous Message Jeff Davis 2007-03-13 17:18:02 Re: Synchronized Scan update