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 pete...@gmx.net 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

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 robertmh...@gmail.com wrote: On Thu, Jul 7, 2011 at 3:21 PM, Noah Misch n...@2ndquadrant.com 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 n...@2ndquadrant.com wrote:

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 robertmh...@gmail.com wrote: On Thu, Jul 7, 2011 at 3:21 PM, Noah Misch n...@2ndquadrant.com wrote: On Thu, Jul 07, 2011 at 03:06:46PM -0400, Robert Haas wrote: On Thu, Jul 7, 2011 at 2:55 PM,

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 n...@2ndquadrant.com 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

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 robertmh...@gmail.com wrote: On Wed, Jul 6, 2011 at 2:50 PM, Noah Misch n...@2ndquadrant.com 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

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 robertmh...@gmail.com wrote: On Wed, Jul 6, 2011 at 2:50 PM, Noah Misch n...@2ndquadrant.com wrote: Drat; fixed in this version.  My local branches contain a large test battery that I

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 n...@2ndquadrant.com 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

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 n...@2ndquadrant.com wrote: CheckIndexCompatible() calls ComputeIndexAttrs() to resolve the new operator classes, collations and exclusion operators for each index column.  It then checks

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 n...@2ndquadrant.com 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 n...@2ndquadrant.com wrote: CheckIndexCompatible() calls ComputeIndexAttrs() to resolve the new operator classes,

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 robertmh...@gmail.com 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

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 robertmh...@gmail.com 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

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 n...@leadboat.com 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-30 Thread Robert Haas
On Thu, Jun 30, 2011 at 11:55 AM, Noah Misch n...@leadboat.com 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 n...@leadboat.com wrote: Here's the call stack in question: ? ? ? ?RelationBuildLocalRelation ? ? ? ?heap_create

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 n...@leadboat.com 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 n...@leadboat.com wrote: On Mon, Jun 27, 2011 at 03:45:43PM -0400, Robert Haas wrote: On Wed, Jun 15, 2011 at 1:03

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 n...@leadboat.com 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 n...@leadboat.com wrote: [patch to avoid index rebuilds] With respect to the documentation hunks, it seems to me that

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 n...@leadboat.com 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 n...@leadboat.com wrote: [patch to avoid index

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 n...@leadboat.com 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

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 n...@leadboat.com 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