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 CAB7nPqS4wsPGx2y6GqKXVBPNeWaA_Mkk4+jpWwWn9EhBk5e4_g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #11638: Transaction safety fails when constraints are dropped and analyze is done  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-bugs
On Wed, Oct 29, 2014 at 8:52 AM, Andres Freund <andres@2ndquadrant.com> wrote:
> On 2014-10-28 19:28:05 -0400, Tom Lane wrote:
>> I wrote:
>> > I think that a better answer is to continue to do this update
>> > nontransactionally, but to not let the code clear relhasindex etc
>> > if we're inside a transaction block.  It is certainly safe to put
>> > off clearing those flags if we're not sure that we're seeing a
>> > committed state of the table's schema.
>>
>> Attached is a proposed patch to do it that way.  I borrowed Michael's
>> test case.
>
> I still think it'd be better to use a transactional update. But I also
> *do* agree that this is the safer way forward for now. So +1 from me.
A transactional update would be better thinking long-term (ANALYZE is
still transactional), but well this fix makes it as well. So no loud
complains here and let's go with what is proposed.
Regards,
--
Michael

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #11807: Postgresql server crashed when running transaction tests
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Need guidance on regression.diffs