Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: 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:01:38
Message-ID: 25100.1279321298@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-07-16 23:53:24 Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock
Previous Message Dimitri Fontaine 2010-07-16 22:45:16 Re: SHOW TABLES