Re: [GENERAL] Concurrency problem building indexes

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] Concurrency problem building indexes
Дата
Msg-id 19159.1145977085@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [GENERAL] Concurrency problem building indexes  ("Zeugswetter Andreas DCP SD" <ZeugswetterA@spardat.at>)
Ответы Re: [GENERAL] Concurrency problem building indexes  (Wes <wespvp@syntegra.com>)
Список pgsql-hackers
"Zeugswetter Andreas DCP SD" <ZeugswetterA@spardat.at> writes:
> My answer to this would be to (have an option to) ommit this relpages 
> and reltuples update.

Wouldn't help, unless you want to get rid of relhasindex too.

> Wes, you could most likely solve your immediate problem if you did an
> analyze before creating the indexes.

No, because that would install an approximate tuple count that the first
CREATE INDEX would (most likely) still want to replace.

The best I can gather from Wes' mail is that he's somehow getting a
higher-than-chance probability that the first two CREATE INDEX commands
finish at almost exactly the same time, and thus neither one of them
sees the pg_class row as already updated with the correct values.
I can't think of any effect in the PG code that would make CREATE INDEX
commands tend to converge rather than diverge, so maybe there is some
external effect here.  Wes, is your machine a dual processor by any
chance?  Which OS X version exactly?
        regards, tom lane


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

Предыдущее
От: "Zeugswetter Andreas DCP SD"
Дата:
Сообщение: Re: [GENERAL] Concurrency problem building indexes
Следующее
От: REYNAUD Jean-Samuel
Дата:
Сообщение: FOR UPDATE lock problem ?