From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | cg(at)osss(dot)net, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #11638: Transaction safety fails when constraints are dropped and analyze is done |
Date: | 2014-10-15 06:18:15 |
Message-ID: | 20141015061815.GF7242@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On 2014-10-15 15:02:43 +0900, Michael Paquier wrote:
> On Wed, Oct 15, 2014 at 2:12 PM, Andres Freund <andres(at)2ndquadrant(dot)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...
Also they all take ShareUpdateExclusive locks preventing them from
running concurrently.
> 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.
Have you tested that the problem's now fixed?
Imo this is complex enough to deserve a regression test. Can you add
one?
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | David G Johnston | 2014-10-15 06:57:24 | Re: BUG #11671: UNACCENT call with constant arg evaluated for each row |
Previous Message | Michael Paquier | 2014-10-15 06:02:43 | Re: BUG #11638: Transaction safety fails when constraints are dropped and analyze is done |