Re: [HACKERS] Reduce lock levels for ADD and DROP COLUMN

2010-12-27 Thread Simon Riggs
On Mon, 2010-12-27 at 13:33 -0500, Tom Lane wrote: > Simon Riggs writes: > > Do you disagree with the ADD or the DROP, or both? > > Both. > > > What "stuff" will break, in your opinion? I'm not asking you to do the > > research, but a few curveballs would be enough to end this quickly, and > > l

Re: [HACKERS] Reduce lock levels for ADD and DROP COLUMN

2010-12-27 Thread Tom Lane
Simon Riggs writes: > Do you disagree with the ADD or the DROP, or both? Both. > What "stuff" will break, in your opinion? I'm not asking you to do the > research, but a few curveballs would be enough to end this quickly, and > leave a good record for the archives. The most obvious point is tha

Re: [HACKERS] Reduce lock levels for ADD and DROP COLUMN

2010-12-27 Thread Simon Riggs
On Mon, 2010-12-27 at 10:41 -0500, Tom Lane wrote: > Robert Haas writes: > > On Mon, Dec 27, 2010 at 6:42 AM, Simon Riggs wrote: > >> Idea is to reduce lock level of ADD/DROP COLUMN from AccessExclusiveLock > >> down to ShareRowExclusiveLock. > >> > >> To make it work, we need to recognise that

Re: [HACKERS] Reduce lock levels for ADD and DROP COLUMN

2010-12-27 Thread Simon Riggs
On Mon, 2010-12-27 at 10:24 -0500, Robert Haas wrote: > On Mon, Dec 27, 2010 at 6:42 AM, Simon Riggs wrote: > > Idea is to reduce lock level of ADD/DROP COLUMN from AccessExclusiveLock > > down to ShareRowExclusiveLock. > > > > To make it work, we need to recognise that we are adding a column > >

Re: [HACKERS] Reduce lock levels for ADD and DROP COLUMN

2010-12-27 Thread Tom Lane
Robert Haas writes: > On Mon, Dec 27, 2010 at 6:42 AM, Simon Riggs wrote: >> Idea is to reduce lock level of ADD/DROP COLUMN from AccessExclusiveLock >> down to ShareRowExclusiveLock. >> >> To make it work, we need to recognise that we are adding a column >> without rewriting the table. > Can y

Re: [HACKERS] Reduce lock levels for ADD and DROP COLUMN

2010-12-27 Thread Robert Haas
On Mon, Dec 27, 2010 at 6:42 AM, Simon Riggs wrote: > Idea is to reduce lock level of ADD/DROP COLUMN from AccessExclusiveLock > down to ShareRowExclusiveLock. > > To make it work, we need to recognise that we are adding a column > without rewriting the table. Can you elaborate on why you think t

[HACKERS] Reduce lock levels for ADD and DROP COLUMN

2010-12-27 Thread Simon Riggs
Idea is to reduce lock level of ADD/DROP COLUMN from AccessExclusiveLock down to ShareRowExclusiveLock. To make it work, we need to recognise that we are adding a column without rewriting the table. That's a simple test at post parse analysis stage, but what I can't do is work out whether the col