Re: BUG #11638: Transaction safety fails when constraints are dropped and analyze is done - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #11638: Transaction safety fails when constraints are dropped and analyze is done
Date
Msg-id CAB7nPqS4wsPGx2y6GqKXVBPNeWaA_Mkk4+jpWwWn9EhBk5e4_g@mail.gmail.com
Whole thread Raw
In response to Re: BUG #11638: Transaction safety fails when constraints are dropped and analyze is done  (Andres Freund <andres@2ndquadrant.com>)
List 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 by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG #11807: Postgresql server crashed when running transaction tests
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] Need guidance on regression.diffs