Re: CREATE INDEX and HOT - revised design

Поиск
Список
Период
Сортировка
От Csaba Nagy
Тема Re: CREATE INDEX and HOT - revised design
Дата
Msg-id 1174555368.10829.79.camel@coppola.muc.ecircle.de
обсуждение исходный текст
Ответ на Re: CREATE INDEX and HOT - revised design  ("Merlin Moncure" <mmoncure@gmail.com>)
Ответы Re: CREATE INDEX and HOT - revised design  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
Список pgsql-hackers
> speaking with pavan off list he seems to think that only 'create
> index' is outside transaction, not the other ddl flavors of it because
> they are generally acquiring a excl lock.  so, in that sense it is
> possibly acceptable to me although still a pretty tough pill to
> swallow (thinking, guc time).  It would also preclude ever integrating
> vanilla 'create index' to create table command, fwiw.

Just to signal that it is in use: we did use create index in
transactions occasionally when we had to do DB schema upgrade on
production systems for application upgrades which span multiple versions
of our application (normally we upgrade versions one by one, but we have
some systems which are upgraded rarely). In these occasions it was
riskier than usually to run the cumulated upgrade scripts outside a
transaction block.

But that was mostly a convenience feature, we could always rearrange our
upgrade scripts to do all the rest first and then all the index creation
at the end if all the rest succeeded... but if implicit index creation
fails (e.g. when adding a new field to a table which happens also to be
a primary key) inside the transaction, that would hurt... mostly in more
work/more risks of extended downtime, but it will have a factor of
inconvenience.

Cheers,
Csaba.




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

Предыдущее
От: "Dany DeBontridder"
Дата:
Сообщение: Re: Patch for pg_dump
Следующее
От: "Pavan Deolasee"
Дата:
Сообщение: Re: CREATE INDEX and HOT - revised design