Re: Final Thoughts for 8.3 on LWLocking and Scalability
От | Simon Riggs |
---|---|
Тема | Re: Final Thoughts for 8.3 on LWLocking and Scalability |
Дата | |
Msg-id | 1205950605.4285.468.camel@ebony.site обсуждение исходный текст |
Ответ на | Re: Final Thoughts for 8.3 on LWLocking and Scalability (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
On Wed, 2008-03-19 at 12:24 -0400, Tom Lane wrote: > > [ sinval lock management needs redesign ] > > Yup it does. I wrote a redesigned, simplified version of my earlier patch. Enclosed here for discussion only, not expecting this to be the final version. Comments at top of patch explain it. The basic idea is to identify a single backend to delete the sinval message queue, without the need for redesigning the postmaster to handle single-backend invalidation messages. > > 4. WALWriteLock is acquired in Shared mode by bgwriter when it runs > > GetLastSegSwitchTime(). All other callers are Exclusive lockers, so the > > Shared request will queue like everybody else. WALWriteLock queue length > > can be long, so the bgwriter can get stuck for much longer than > > bgwriter_delay when it makes this call; this happens only when > > archive_timeout > 0 so probably has never shown up in any performance > > testing. XLogWrite takes info_lck also, so we can move the > > lastSegSwitchTime behind that lock instead. That way bgwriter need never > > wait on I/O, just spin for access to info_lck. Minor change. > > This seems like a possibly reasonable thing to do; did you ever write > a patch for it? No, but happy to do so. -- Simon Riggs 2ndQuadrant http://www.2ndQuadrant.com PostgreSQL UK 2008 Conference: http://www.postgresql.org.uk
Вложения
В списке pgsql-hackers по дате отправления: