X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 87B8DD1B533 for ; Mon, 27 Oct 2003 19:10:21 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 07838-07 for ; Mon, 27 Oct 2003 15:09:51 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id E4F23D1B559 for ; Mon, 27 Oct 2003 15:09:47 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id h9RJ9mit001990; Mon, 27 Oct 2003 14:09:48 -0500 (EST) To: Neil Conway Cc: Greg Stark , Dror Matalon , PostgreSQL Performance Subject: Re: Various performance questions In-reply-to: <1067280889.460.67.camel@tokyo> References: <20031026194449.GD2979@rlx11.zapatec.com> <87u15vxrue.fsf@stark.dyndns.tv> <1067269309.459.33.camel@tokyo> <877k2qy36r.fsf@stark.dyndns.tv> <1067280005.463.48.camel@tokyo> <1735.1067280732@sss.pgh.pa.us> <1067280889.460.67.camel@tokyo> Comments: In-reply-to Neil Conway message dated "Mon, 27 Oct 2003 13:54:50 -0500" Date: Mon, 27 Oct 2003 14:09:48 -0500 Message-ID: <1989.1067281788@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/690 X-Sequence-Number: 4438 Neil Conway writes: > Interesting. Is there a reason why int8 is pass-by-reference? Pass-by-value types have to fit into Datum. On a 64-bit machine (ie, one where pointers are 64-bits anyway) it would make sense to convert int8 (and float8 too) into pass-by-value types. If the machine does not already need Datum to be 8 bytes, though, I think that widening Datum to 8 bytes just for the benefit of these two datatypes would be a serious net loss. Not to mention that it would just plain break everything on machines with no native 8-byte-int datatype. One of the motivations for the version-1 function call protocol was to allow the pass-by-value-or-by-ref nature of these datatypes to be hidden from most of the code, with an eye to someday making this a platform-specific choice. regards, tom lane