Re: Signaling of waiting for a cleanup lock?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Signaling of waiting for a cleanup lock?
Дата
Msg-id 20140414170142.GG5822@eldon.alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Signaling of waiting for a cleanup lock?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:

> In an ideal world, when we needed to wait for a cleanup lock, we'd cause
> the lock manager to set up pre-granted sharable page locks for all the
> processes currently holding buffer pins, and then wait for an exclusive
> page lock.  The current hack of signaling when you're the last one off the
> page would be replaced by releasing your lock (if it exists) when you drop
> your own pin.  I'm not sure it's really worth the trouble to try to do
> this, but it would solve the visibility problem; and it might allow us to
> be a bit smarter about the priority of a cleanup lock request versus
> incoming regular pin requests.

AFAIU this would represent a behavioral change: right now, vacuum waits
until everybody is gone, and new pinners might arrive while vacuum is
waiting.  With this scheme, new pinners would have to wait behind
vacuum.  Maybe this change alone is enough to avoid vacuum blocking for
long periods waiting for cleanup lock.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Including replication slot data in base backups
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Signaling of waiting for a cleanup lock?