Ühel kenal päeval, T, 2007-03-13 kell 12:53, kirjutas Tom Lane: > Jeff Davis <[EMAIL PROTECTED]> 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 ---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate