Re: CIC and deadlocks

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: CIC and deadlocks
Дата
Msg-id 7574.1175367640@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: CIC and deadlocks  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
Ответы Re: CIC and deadlocks  ("Pavan Deolasee" <pavan.deolasee@enterprisedb.com>)
Re: CIC and deadlocks  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
Список pgsql-hackers
"Pavan Deolasee" <pavan.deolasee@gmail.com> writes:
> Yes, it may work. Do we need to take some extra care because
> proc-xmin is set while holding SHARED lock on proc array ?

Good point.  I'm envisioning a procarray.c function along the
lines of bool TransactionHasSnapshot(xid)
which returns true if the xid is currently listed in PGPROC
and has a nonzero xmin.  CIC's cleanup wait loop would check
this and ignore the xid if it returns false.  Your point means
that this function would have to take exclusive not shared lock
while scanning the procarray, which is kind of annoying, but
it seems not fatal since CIC isn't done all that frequently.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Oracle indemnifies PostgreSQL on its patents
Следующее
От: "Luke Lonergan"
Дата:
Сообщение: Re: Oracle indemnifies PostgreSQL on its patents