Re: [HACKERS] Fix for pg_upgrade and invalid indexes

2013-03-30 Thread Andres Freund
On 2013-03-29 19:03:05 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: Those columns cannot be NULL, so using IS DISTINCT FROM seems a bit clumsy. That was what I started to write, too, but actually I think the IS DISTINCT is correct and the RIGHT JOIN should be a LEFT

Re: [HACKERS] Fix for pg_upgrade and invalid indexes

2013-03-30 Thread Bruce Momjian
OK, patch applied and backpatched as far back as pg_upgrade exists in git. --- On Fri, Mar 29, 2013 at 11:35:13PM -0400, Bruce Momjian wrote: On Fri, Mar 29, 2013 at 07:03:05PM -0400, Tom Lane wrote: Andres Freund

[HACKERS] Fix for pg_upgrade and invalid indexes

2013-03-29 Thread Bruce Momjian
On Thu, Mar 28, 2013 at 05:27:28PM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Should I just patch pg_upgrade to remove the indisvalid, skip indisvalid indexes, and backpatch it? Users should be using the version of pg_upgrade to match new pg_dump. Is there any case

Re: [HACKERS] Fix for pg_upgrade and invalid indexes

2013-03-29 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Attached is a patch that implements the suggested pg_upgrade changes of not copying invalid indexes now that pg_dump doesn't dump them. This should be backpatched back to 8.4 to match pg_dump. It might require release note updates; not sure.

Re: [HACKERS] Fix for pg_upgrade and invalid indexes

2013-03-29 Thread Andres Freund
On 2013-03-29 16:57:06 -0400, Bruce Momjian wrote: On Thu, Mar 28, 2013 at 05:27:28PM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Should I just patch pg_upgrade to remove the indisvalid, skip indisvalid indexes, and backpatch it? Users should be using the version of

Re: [HACKERS] Fix for pg_upgrade and invalid indexes

2013-03-29 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: Those columns cannot be NULL, so using IS DISTINCT FROM seems a bit clumsy. That was what I started to write, too, but actually I think the IS DISTINCT is correct and the RIGHT JOIN should be a LEFT JOIN. Note that the query appears to be intended

Re: [HACKERS] Fix for pg_upgrade and invalid indexes

2013-03-29 Thread Bruce Momjian
On Fri, Mar 29, 2013 at 07:03:05PM -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: Those columns cannot be NULL, so using IS DISTINCT FROM seems a bit clumsy. That was what I started to write, too, but actually I think the IS DISTINCT is correct and the RIGHT JOIN