Skip site navigation (1) Skip section navigation (2)

Re: GEQO Triggers Server Crash

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kris Jurka <jurka(at)ejurka(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: GEQO Triggers Server Crash
Date: 2002-12-06 22:40:17
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugspgsql-hackers
Kris Jurka <jurka(at)ejurka(dot)com> writes:
> [ GEQO doesn't work anymore in CVS tip ]

Ugh.  The proximate cause of this is the code I added recently to cache
repeated calculations of the best inner indexscan for a given inner
relation with potential outer relations.  Since geqo_eval() releases
all memory acquired during construction of a possible jointree, it
releases the cached path info too.  The next attempt to use the data

Naturally, ripping out the cache again doesn't strike me as an appealing

The narrowest fix would be to hack best_inner_indexscan() to switch into
the context containing the parent RelOptInfo while it makes a cache
entry.  This seems kinda klugy but it would work.

I wonder if we'd be better off not trying to reclaim memory in
geqo_eval.  Aside from presenting a constant risk of this sort of
problem whenever someone hacks the optimizer, what it's really doing
is discarding a whole lot of join cost estimates that are likely to
be done over again in (some of) the following calls of geqo_eval.
GEQO would certainly be a lot faster if we didn't release that info,
and I'm not sure that the space cost would be as bad as the code
comments claim.  Any thoughts?

This really just points up how messy memory management in the optimizer
is at present.  I wonder if anyone has ideas on improving it ...

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2002-12-06 23:00:24
Subject: Re: SELECT FOR UPDATE locks whole table
Previous:From: Ian BarwickDate: 2002-12-06 22:29:33
Subject: Re: Q: "unknown expression type 108" ?

pgsql-bugs by date

Next:From: Ruslan A DautkhanovDate: 2002-12-08 13:28:45
Subject: datatypes: text vs varchar
Previous:From: Stephan SzaboDate: 2002-12-06 21:58:08
Subject: Re: Bug #840: Query with null string

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group