Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Simon Riggs <simon(at)2ndquadrant(dot)com>
Subject: Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock
Date: 2010-07-16 23:53:24
Message-ID: 17B09E91-F51E-4F9E-9B59-06432C26B68C@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Jul 16, 2010, at 6:01 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Andres Freund <andres(at)anarazel(dot)de> writes:
>> What could the join removal path (and similar places) *possibly* do against
>> such a case? Without stopping to use SnapshotNow I dont see any way :-(
>
> But the planner, along with most of the rest of the backend, *does* use
> SnapshotNow when examining the system catalogs.
>
> I share your feeling of discomfort but so far I don't see a hole in
> Simon's argument. Adding a constraint should never make a
> previously-correct plan incorrect. Removing one is a very different
> story, but he says he's not changing that case. (Disclaimer: I have
> not read the patch.)

Perhaps we should start by deciding whether Andres' case is a bug in the first place, and then we can argue about whether it's a join-removal bug, a lock-weakening bug, or a preexisting bug.

...Robert

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2010-07-17 00:20:37 Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock
Previous Message Tom Lane 2010-07-16 23:01:38 Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock