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

pgsql: Teach tuplestore.c to throw away data before the "mark" point

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Teach tuplestore.c to throw away data before the "mark" point
Date: 2007-05-21 17:57:35
Message-ID: 20070521175735.40C8B9FB4B9@postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Teach tuplestore.c to throw away data before the "mark" point when the caller
is using mark/restore but not rewind or backward-scan capability.  Insert a
materialize plan node between a mergejoin and its inner child if the inner
child is a sort that is expected to spill to disk.  The materialize shields
the sort from the need to do mark/restore and thereby allows it to perform
its final merge pass on-the-fly; while the materialize itself is normally
cheap since it won't spill to disk unless the number of tuples with equal
key values exceeds work_mem.

Greg Stark, with some kibitzing from Tom Lane.

Modified Files:
--------------
    pgsql/src/backend/executor:
        nodeMaterial.c (r1.58 -> r1.59)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeMaterial.c.diff?r1=1.58&r2=1.59)
        nodeMergejoin.c (r1.87 -> r1.88)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeMergejoin.c.diff?r1=1.87&r2=1.88)
    pgsql/src/backend/optimizer/path:
        costsize.c (r1.182 -> r1.183)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/costsize.c.diff?r1=1.182&r2=1.183)
    pgsql/src/backend/optimizer/plan:
        createplan.c (r1.230 -> r1.231)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/createplan.c.diff?r1=1.230&r2=1.231)
    pgsql/src/backend/utils/sort:
        tuplestore.c (r1.30 -> r1.31)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/sort/tuplestore.c.diff?r1=1.30&r2=1.31)
    pgsql/src/include/nodes:
        execnodes.h (r1.174 -> r1.175)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/execnodes.h.diff?r1=1.174&r2=1.175)
    pgsql/src/include/optimizer:
        cost.h (r1.86 -> r1.87)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/cost.h.diff?r1=1.86&r2=1.87)
    pgsql/src/include/utils:
        tuplestore.h (r1.20 -> r1.21)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/tuplestore.h.diff?r1=1.20&r2=1.21)

Responses

pgsql-committers by date

Next:From: Tom LaneDate: 2007-05-22 01:40:33
Subject: pgsql: Fix best_inner_indexscan to return both the cheapest-total-cost
Previous:From: Peter EisentrautDate: 2007-05-21 17:10:30
Subject: pgsql: XPath fixes: - Function renamed to "xpath".

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