Re: CIC and deadlocks

Поиск
Список
Период
Сортировка
От Pavan Deolasee
Тема Re: CIC and deadlocks
Дата
Msg-id 2e78013d0703311121u43dacd82x8a7bc7b537798da9@mail.gmail.com
обсуждение исходный текст
Ответ на Re: CIC and deadlocks  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: CIC and deadlocks  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers

On 3/31/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Hmm ... only if it's already set inVacuum true ... there's a window
where it has not.

I wonder whether we could change CIC so that the "reference
snapshot" lists only transactions that are running and have already
determined their serializable snapshot (ie, have set proc->xmin).
Xacts that haven't yet done that can be ignored because they couldn't
possibly see the dead tuples we're worried about, no?

Yes, it may work. Do we need to take some extra care because
proc-xmin is set while holding SHARED lock on proc array ?
 

Then we could rearrange the order of operations in vacuum_rel so
that we lock the target rel before we acquire a snapshot.  Then
a vacuum waiting for the CIC cannot cause a deadlock.

We may need to do the same in analyze_rel.


Thanks,
Pavan

--

EnterpriseDB     http://www.enterprisedb.com

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

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