Thread: New compile warnings for inheritance

New compile warnings for inheritance

From
Bruce Momjian
Date:
I am seeing the following regression failures with CVS head and
inheritance tests.  They look like sort order problems:

---------------------------------------------------------------------------

*** ./expected/inherit.out    Wed Dec  1 16:53:51 2004
--- ./results/inherit.out    Wed Dec  1 17:10:12 2004
***************
*** 561,573 ****  relname | f1 | f2   ---------+----+-----  bar     |  4 |   4
-  bar     |  3 | 103
-  bar     |  2 | 102  bar     |  1 | 101  bar2    |  4 |   4
-  bar2    |  3 | 103
-  bar2    |  2 | 102  bar2    |  1 | 101 (8 rows)  /* Test inheritance of structure (LIKE) */
--- 561,573 ----  relname | f1 | f2   ---------+----+-----  bar     |  4 |   4  bar     |  1 | 101
+  bar     |  2 | 102
+  bar     |  3 | 103  bar2    |  4 |   4  bar2    |  1 | 101
+  bar2    |  2 | 102
+  bar2    |  3 | 103 (8 rows)  /* Test inheritance of structure (LIKE) */

======================================================================


--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


Re: New compile warnings for inheritance

From
Tom Lane
Date:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I am seeing the following regression failures with CVS head and
> inheritance tests.  They look like sort order problems:

Does it go away if you initdb?  I suspect the size of pg_class is a
factor in the choice of plan for that query.  You seem to still be
getting the old plan ...
        regards, tom lane


Re: New compile warnings for inheritance

From
Neil Conway
Date:
On Wed, 2004-12-01 at 17:22 -0500, Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > I am seeing the following regression failures with CVS head and
> > inheritance tests.  They look like sort order problems:
>
> Does it go away if you initdb?  I suspect the size of pg_class is a
> factor in the choice of plan for that query.  You seem to still be
> getting the old plan ...

I see regression test failures in both inheritence and join (after a
fresh initdb). Attached is the regression.diffs, gzip'ed.

-Neil


Attachment

Re: New compile warnings for inheritance

From
Tom Lane
Date:
Neil Conway <neilc@samurai.com> writes:
> I see regression test failures in both inheritence and join (after a
> fresh initdb). Attached is the regression.diffs, gzip'ed.

Yeah, so do I on a Linux machine.  It looks like the dynamic size
estimates are highlighting some platform dependencies, such as the
effect of different MAXALIGN values on the costs, that we happened not
to see in the regression tests before.  I'm working on cleaning it up
...
        regards, tom lane


Re: New compile warnings for inheritance

From
Tom Lane
Date:
Neil Conway <neilc@samurai.com> writes:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
>> I am seeing the following regression failures with CVS head and
>> inheritance tests.  They look like sort order problems:

> I see regression test failures in both inheritence and join (after a
> fresh initdb). Attached is the regression.diffs, gzip'ed.

Okay, I committed some tweaks to reduce platform dependencies.  I get
passes now on all three platforms I have handy.
        regards, tom lane


Re: New compile warnings for inheritance

From
Tom Lane
Date:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tom Lane wrote:
>> Does it go away if you initdb?  I suspect the size of pg_class is a
>> factor in the choice of plan for that query.  You seem to still be
>> getting the old plan ...

> An initdb does not change the regression failure.  Sorry.

Hmph.  I'm unsure why there's a platform dependency there, but we should
probably just add an ORDER BY to suppress it.  Will do.
        regards, tom lane


Re: New compile warnings for inheritance

From
Tom Lane
Date:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tom Lane wrote:
>> Hmph.  I'm unsure why there's a platform dependency there, but we should
>> probably just add an ORDER BY to suppress it.  Will do.

> Why did it just appear?  Optimizer changes in the past few days?

I did just change the planner, but what I don't understand at the moment
is why the results changed for me and not for you.

It looks like it's not actually the join to pg_class that is determining
this, but the plan used for the UPDATE just above it.  That involves
only freshly-created tables and so it ought to be pretty much the same
planner problem for everyone.  Odd.  I'm building now on a Linux machine
to see if I can reproduce your result when using little-endian hardware.
        regards, tom lane


Re: New compile warnings for inheritance

From
Bruce Momjian
Date:
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Tom Lane wrote:
> >> Does it go away if you initdb?  I suspect the size of pg_class is a
> >> factor in the choice of plan for that query.  You seem to still be
> >> getting the old plan ...
> 
> > An initdb does not change the regression failure.  Sorry.
> 
> Hmph.  I'm unsure why there's a platform dependency there, but we should
> probably just add an ORDER BY to suppress it.  Will do.

Why did it just appear?  Optimizer changes in the past few days?

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


Re: New compile warnings for inheritance

From
Bruce Momjian
Date:
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > I am seeing the following regression failures with CVS head and
> > inheritance tests.  They look like sort order problems:
> 
> Does it go away if you initdb?  I suspect the size of pg_class is a
> factor in the choice of plan for that query.  You seem to still be
> getting the old plan ...

An initdb does not change the regression failure.  Sorry.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


Re: New compile warnings for inheritance

From
Michael Fuhr
Date:
On Wed, Dec 01, 2004 at 08:35:40PM -0500, Tom Lane wrote:

> Okay, I committed some tweaks to reduce platform dependencies.  I get
> passes now on all three platforms I have handy.

It passes on my FreeBSD 4.10-STABLE box.

Don't know about Solaris 9/sparc yet -- the whole dance takes over
an hour on my (t)rusty ol' Ultra 1.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/


Re: New compile warnings for inheritance

From
Michael Fuhr
Date:
On Wed, Dec 01, 2004 at 08:10:24PM -0700, Michael Fuhr wrote:

> Don't know about Solaris 9/sparc yet -- the whole dance takes over
> an hour on my (t)rusty ol' Ultra 1.

Solaris 9/sparc passes all tests.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/