Re: Simultaneous index creates on different schemas cause deadlock?

Поиск
Список
Период
Сортировка
От Paul Hinze
Тема Re: Simultaneous index creates on different schemas cause deadlock?
Дата
Msg-id CAN=EPwKZ+Ae2u=NiYFkynJVForxV4mUbFLa-RWvj-5czA9cMOw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Simultaneous index creates on different schemas cause deadlock?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-admin
On Thu, Apr 25, 2013 at 12:17 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> The cause is that each one will wait for all older snapshots to be
> gone --- and it does that before dropping its own snapshot, so that the
> other ones will see it as something to be waited out too.

This makes sense. Thank you for explaining.

> Since we know that C.I.C. executes in its own transaction, and there
> can't be more than one on the same table due to locking, it seems to me
> that it'd be safe to drop our own snapshot before waiting for other
> xacts to end.  That is, we could just rearrange the last few steps in
> DefineIndex(), taking care to save snapshot->xmin before we destroy the
> snapshot so that we still have that value to pass to
> GetCurrentVirtualXIDs().

Seems reasonable to me. Looks like a fix landed in master yesterday:

http://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=c3d09b3bd23f5f65b5eb8124a3c7592dad85a50c

Many thanks to Tom and all the pgsql-hackers for all the work you do!

Paul


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

Предыдущее
От: Albe Laurenz
Дата:
Сообщение: Re: archive falling behind
Следующее
От: Strahinja Kustudić
Дата:
Сообщение: Re: archive falling behind