Re: Synchronized scans

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Synchronized scans
Дата
Msg-id 1180994959.7660.61.camel@dogma.v10.wvs
обсуждение исходный текст
Ответ на Re: Synchronized scans  (Heikki Linnakangas <heikki@enterprisedb.com>)
Ответы Re: Synchronized scans  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
On Mon, 2007-06-04 at 22:57 +0100, Heikki Linnakangas wrote:
> > That's what I thought at first, and why I didn't do it. Right now I'm
> > thinking we could just add the PID to the hint, so that it would only
> > remove its own hint. Would that work?
>
> 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 thought was that every time the location was reported by a backend,
it would store 3 pieces of information, not 2:
 * relfilenode
 * the PID of the backend that created or updated this particular hint
last
 * the location

Then, on heap_endscan() (if that's the right place), we find the hint,
and if the PID matches, we remove it. If not, it does nothing.

This would only matter when there weren't other scans. When concurrent
scans were happening, chances are the PID wouldn't match anyway, and
thus not be removed.

Regards,
    Jeff Davis




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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Synchronized scans
Следующее
От: Michael Glaesemann
Дата:
Сообщение: Re: Synchronized scans