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

Avoid needless copy in nodeMaterial

From: Neil Conway <neilc(at)samurai(dot)com>
To: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Avoid needless copy in nodeMaterial
Date: 2007-10-16 04:05:23
Message-ID: 1192507523.6133.21.camel@goldbach (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Attached is a patch that avoids a needless copy of the result tuple in
nodeMaterial, in the case that we don't have a previously-materialized
tuple to return. We can just return the TTS produced by executing our
child node, rather than returning a copy of it.

I didn't bother pulling the MinimalTuple out of "outerslot" and stuffing
it back into the nodeMaterial's result slot, as AFAICS that is not
necessary. Although I suppose you could make a cleanliness argument that
that would be worth doing instead.

(This is 8.4 material...)


Attachment: material_copy_tweak-1.patch
Description: text/x-patch (1.8 KB)


pgsql-patches by date

Next:From: Tom LaneDate: 2007-10-16 04:34:12
Subject: Re: Avoid needless copy in nodeMaterial
Previous:From: ITAGAKI TakahiroDate: 2007-10-16 04:04:28
Subject: V3 protocol is slower than V2

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