Re: Synchronized scans

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: Synchronized scans
Дата
Msg-id 876463uyl3.fsf@oxford.xeocode.com
обсуждение исходный текст
Ответ на Re: Synchronized scans  (Heikki Linnakangas <heikki@enterprisedb.com>)
Список pgsql-patches
"Heikki Linnakangas" <heikki@enterprisedb.com> writes:

> Were you thinking of storing the PID of the backend that originally created the
> hint, or updating the PID every time the hint is updated? In any case, we still
> wouldn't know if there's other scanners still running.

My reaction was if you always put the pid in when updating the hint it might
work out pretty well. When you finish you remove the hint iff the pid is your
own.

It has exactly the same properties you describe of leaving a small window with
no hint when you finish a scan but only if you were the last to update the
scan position which i would expect would be pretty rare except for the last
scanner.

If a backend died it would leave a scan position behind but the next scanner
on that table would overwrite the pid and then remove it when it's finished.

--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Synchronized scans
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: Synchronized scans