Improve planning of Materialize nodes inserted atop the inner input of a

Tom Lane <tgl@sss.pgh.pa.us>

Commit: caf9c830d9d1180ab693f8a6eb205f5862174158
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2009-11-15T02:45:35Z
Releases: 9.0.0
Improve planning of Materialize nodes inserted atop the inner input of a
mergejoin to shield it from doing mark/restore and refetches.  Put an explicit
flag in MergePath so we can centralize the logic that knows about this,
and add costing logic that considers using Materialize even when it's not
forced by the previously-existing considerations.  This is in response to
a discussion back in August that suggested that materializing an inner
indexscan can be helpful when the refetch percentage is high enough.

Files