Re: [HACKERS] Avoid index rebuilds for no-rewrite ALTER TABLE ALTER TYPE

2011-07-19 Thread Robert Haas
On Tue, Jul 19, 2011 at 12:24 AM, Peter Eisentraut wrote: > Please review and fix this compiler warning: > > indexcmds.c: In function ‘CheckIndexCompatible’: > indexcmds.c:126:15: warning: variable ‘amoptions’ set but not used > [-Wunused-but-set-variable] I have removed the offending variable.

Re: [HACKERS] Avoid index rebuilds for no-rewrite ALTER TABLE ALTER TYPE

2011-07-18 Thread Peter Eisentraut
On mån, 2011-07-18 at 11:05 -0400, Robert Haas wrote: > On Thu, Jul 7, 2011 at 3:25 PM, Robert Haas wrote: > > On Thu, Jul 7, 2011 at 3:21 PM, Noah Misch wrote: > >> On Thu, Jul 07, 2011 at 03:06:46PM -0400, Robert Haas wrote: > >>> On Thu, Jul 7, 2011 at 2:55 PM, Noah Misch wrote: > >>> > Check

Re: [HACKERS] Avoid index rebuilds for no-rewrite ALTER TABLE ALTER TYPE

2011-07-18 Thread Robert Haas
On Thu, Jul 7, 2011 at 3:25 PM, Robert Haas wrote: > On Thu, Jul 7, 2011 at 3:21 PM, Noah Misch wrote: >> On Thu, Jul 07, 2011 at 03:06:46PM -0400, Robert Haas wrote: >>> On Thu, Jul 7, 2011 at 2:55 PM, Noah Misch wrote: >>> > CheckIndexCompatible() calls ComputeIndexAttrs() to resolve the new

Re: [HACKERS] Avoid index rebuilds for no-rewrite ALTER TABLE ALTER TYPE

2011-07-07 Thread Robert Haas
On Thu, Jul 7, 2011 at 3:21 PM, Noah Misch wrote: > On Thu, Jul 07, 2011 at 03:06:46PM -0400, Robert Haas wrote: >> On Thu, Jul 7, 2011 at 2:55 PM, Noah Misch wrote: >> > CheckIndexCompatible() calls ComputeIndexAttrs() to resolve the new >> > operator >> > classes, collations and exclusion oper

Re: [HACKERS] Avoid index rebuilds for no-rewrite ALTER TABLE ALTER TYPE

2011-07-07 Thread Noah Misch
On Thu, Jul 07, 2011 at 03:06:46PM -0400, Robert Haas wrote: > On Thu, Jul 7, 2011 at 2:55 PM, Noah Misch wrote: > > CheckIndexCompatible() calls ComputeIndexAttrs() to resolve the new operator > > classes, collations and exclusion operators for each index column.  It then > > checks those against

Re: [HACKERS] Avoid index rebuilds for no-rewrite ALTER TABLE ALTER TYPE

2011-07-07 Thread Robert Haas
On Thu, Jul 7, 2011 at 2:55 PM, Noah Misch wrote: > CheckIndexCompatible() calls ComputeIndexAttrs() to resolve the new operator > classes, collations and exclusion operators for each index column.  It then > checks those against the existing values for the same.  I figured that was > obvious enou

Re: [HACKERS] Avoid index rebuilds for no-rewrite ALTER TABLE ALTER TYPE

2011-07-07 Thread Noah Misch
On Thu, Jul 07, 2011 at 02:44:49PM -0400, Robert Haas wrote: > On Thu, Jul 7, 2011 at 2:43 PM, Robert Haas wrote: > > On Wed, Jul 6, 2011 at 2:50 PM, Noah Misch wrote: > >> Drat; fixed in this version.  My local branches contain a large test > >> battery > >> that I filter out of the diff before

Re: [HACKERS] Avoid index rebuilds for no-rewrite ALTER TABLE ALTER TYPE

2011-07-07 Thread Robert Haas
On Thu, Jul 7, 2011 at 2:43 PM, Robert Haas wrote: > On Wed, Jul 6, 2011 at 2:50 PM, Noah Misch wrote: >> Drat; fixed in this version.  My local branches contain a large test battery >> that I filter out of the diff before posting.  This time, that filter also >> removed an essential part of the

Re: [HACKERS] Avoid index rebuilds for no-rewrite ALTER TABLE ALTER TYPE

2011-07-07 Thread Robert Haas
On Wed, Jul 6, 2011 at 2:50 PM, Noah Misch wrote: > Drat; fixed in this version.  My local branches contain a large test battery > that I filter out of the diff before posting.  This time, that filter also > removed an essential part of the patch. OK, I'm pretty happy with this version, with the

Re: [HACKERS] Avoid index rebuilds for no-rewrite ALTER TABLE ALTER TYPE

2011-07-06 Thread Noah Misch
On Wed, Jul 06, 2011 at 09:55:01AM -0400, Robert Haas wrote: > On Thu, Jun 30, 2011 at 1:02 PM, Robert Haas wrote: > > On first blush, that looks a whole lot cleaner. ?I'll try to find some > > time for a more detailed review soon. > > This seems not to compile for me: > > gcc -O2 -Wall -Wmissin

Re: [HACKERS] Avoid index rebuilds for no-rewrite ALTER TABLE ALTER TYPE

2011-07-06 Thread Robert Haas
On Thu, Jun 30, 2011 at 1:02 PM, Robert Haas wrote: > On first blush, that looks a whole lot cleaner.  I'll try to find some > time for a more detailed review soon. This seems not to compile for me: gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -

Re: [HACKERS] Avoid index rebuilds for no-rewrite ALTER TABLE ALTER TYPE

2011-06-30 Thread Robert Haas
On Thu, Jun 30, 2011 at 11:55 AM, Noah Misch wrote: > On Wed, Jun 29, 2011 at 09:42:06AM -0400, Robert Haas wrote: >> On Tue, Jun 28, 2011 at 3:40 PM, Noah Misch wrote: > >> > Here's the call stack in question: >> > >> > ? ? ? ?RelationBuildLocalRelation >> > ? ? ? ?heap_create >> > ? ? ? ?index_

Re: [HACKERS] Avoid index rebuilds for no-rewrite ALTER TABLE ALTER TYPE

2011-06-30 Thread Noah Misch
On Wed, Jun 29, 2011 at 09:42:06AM -0400, Robert Haas wrote: > On Tue, Jun 28, 2011 at 3:40 PM, Noah Misch wrote: > > Here's the call stack in question: > > > > ? ? ? ?RelationBuildLocalRelation > > ? ? ? ?heap_create > > ? ? ? ?index_create > > ? ? ? ?DefineIndex > > ? ? ? ?ATExecAddIndex > > >

Re: [HACKERS] Avoid index rebuilds for no-rewrite ALTER TABLE ALTER TYPE

2011-06-29 Thread Robert Haas
On Tue, Jun 28, 2011 at 3:40 PM, Noah Misch wrote: > On Tue, Jun 28, 2011 at 02:11:11PM -0400, Robert Haas wrote: >> On Mon, Jun 27, 2011 at 10:43 PM, Noah Misch wrote: >> > On Mon, Jun 27, 2011 at 03:45:43PM -0400, Robert Haas wrote: >> >> On Wed, Jun 15, 2011 at 1:03 AM, Noah Misch wrote: >> >

Re: [HACKERS] Avoid index rebuilds for no-rewrite ALTER TABLE ALTER TYPE

2011-06-28 Thread Noah Misch
On Tue, Jun 28, 2011 at 02:11:11PM -0400, Robert Haas wrote: > On Mon, Jun 27, 2011 at 10:43 PM, Noah Misch wrote: > > On Mon, Jun 27, 2011 at 03:45:43PM -0400, Robert Haas wrote: > >> On Wed, Jun 15, 2011 at 1:03 AM, Noah Misch wrote: > >> > [patch to avoid index rebuilds] > >> > >> With respect

Re: [HACKERS] Avoid index rebuilds for no-rewrite ALTER TABLE ALTER TYPE

2011-06-28 Thread Robert Haas
On Mon, Jun 27, 2011 at 10:43 PM, Noah Misch wrote: > On Mon, Jun 27, 2011 at 03:45:43PM -0400, Robert Haas wrote: >> On Wed, Jun 15, 2011 at 1:03 AM, Noah Misch wrote: >> > [patch to avoid index rebuilds] >> >> With respect to the documentation hunks, it seems to me that the first >> hunk might

Re: [HACKERS] Avoid index rebuilds for no-rewrite ALTER TABLE ALTER TYPE

2011-06-27 Thread Noah Misch
On Mon, Jun 27, 2011 at 03:45:43PM -0400, Robert Haas wrote: > On Wed, Jun 15, 2011 at 1:03 AM, Noah Misch wrote: > > [patch to avoid index rebuilds] > > With respect to the documentation hunks, it seems to me that the first > hunk might be made clearer by leaving the paragraph of which it is a >

Re: [HACKERS] Avoid index rebuilds for no-rewrite ALTER TABLE ALTER TYPE

2011-06-27 Thread Robert Haas
On Wed, Jun 15, 2011 at 1:03 AM, Noah Misch wrote: > [patch to avoid index rebuilds] With respect to the documentation hunks, it seems to me that the first hunk might be made clearer by leaving the paragraph of which it is a part as-is, and adding another paragraph afterwards beginning with the w

[HACKERS] Avoid index rebuilds for no-rewrite ALTER TABLE ALTER TYPE

2011-06-14 Thread Noah Misch
Previous version (at7-alt-index-opfamily.patch): http://archives.postgresql.org/message-id/20110113230124.ga18...@tornado.gateway.2wire.net Design: http://archives.postgresql.org/message-id/20110524104029.gb18...@tornado.gateway.2wire.net Patches committed in 2011CF1 allow ALTER TABLE ... ALTER ..