Re: BUG #11638: Transaction safety fails when constraints are dropped and analyze is done

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: BUG #11638: Transaction safety fails when constraints are dropped and analyze is done
Дата
Msg-id CAB7nPqTsZUnDNYgLZ8OO5T4rQY+=XSe7uomiv=OVQnJvVzzHJg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #11638: Transaction safety fails when constraints are dropped and analyze is done  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: BUG #11638: Transaction safety fails when constraints are dropped and analyze is done
Список pgsql-bugs


On Wed, Oct 15, 2014 at 2:12 PM, Andres Freund <andres@2ndquadrant.com> wrote:
I'm not sure which danger you're seeing here. Imo we need to choose
between heap_inplace/heap_update for VACUUM/ANALYZE because one is
allowed to run in a transaction, and the other is not. It simply *can't*
be safe for ANALYZE to set things like relhastriggers = false using
heap_inplace().
There's problems with both it rolling back and thus undoing the action
that allowed relhastriggers = false to be set and scenarios where it's
not ok that other backends can see that value before the transaction
committed. 
Hm, I was wondering about the potential effects of VACUUM FULL or VACUUM ANALYZE, but as they cannot run in a tx block... Btw, I have just put my hands on this code and made the attached to make vac_update_relstats able to do a transactional update. It looks to work fine with only a check on the flags of vacuum statement.
Regards,
--
Michael
Вложения

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: BUG #11638: Transaction safety fails when constraints are dropped and analyze is done
Следующее
От: Andres Freund
Дата:
Сообщение: Re: BUG #11638: Transaction safety fails when constraints are dropped and analyze is done