Re: do postgresql this job for me ? (firebird user)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: do postgresql this job for me ? (firebird user)
Дата
Msg-id 3027.1243262380@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: do postgresql this job for me ? (firebird user)  (Craig Ringer <craig@postnewspapers.com.au>)
Ответы Re: do postgresql this job for me ? (firebird user)
Список pgsql-general
Craig Ringer <craig@postnewspapers.com.au> writes:
> The locking docs:
> http://www.postgresql.org/docs/8.3/static/explicit-locking.html
> don't say anything about which lock DROP INDEX takes on a relation. A
> quick test shows it takes an AccessExclusiveLock on the affected index,
> and appears to take no lock at all on the table:

Not sure how you tested that, but index_drop() clearly takes
AccessExclusiveLock on the table too.  (I'm not sure it really needs
to --- the comment therein defending the reasoning seems out of date
--- but it definitely does.)

Whether it did lock the table or not, though, the index lock would
certainly interfere with queries trying to use that index, or even just
considering using the index during planning.  So the recommended
method (CREATE new index, DROP old, RENAME) is designed to hold lock
on the old index for as short a time as possible.

            regards, tom lane

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

Предыдущее
От: Johan Nel
Дата:
Сообщение: Re: Question on Foreign Key Structure/Design
Следующее
От: "Bayless Kirtley"
Дата:
Сообщение: Re: Daylight saving time question