X-Original-To: pgsql-patches-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 80AE59FA4C8 for ; Wed, 2 Aug 2006 16:00:09 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 80874-02 for ; Wed, 2 Aug 2006 15:59:58 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from lists.commandprompt.com (host-130.commandprompt.net [207.173.203.130]) by postgresql.org (Postfix) with ESMTP id 98B369FA4A8 for ; Wed, 2 Aug 2006 15:59:58 -0300 (ADT) Received: from alvh.no-ip.org (200-126-100-4.bk7-dsl.surnet.cl [200.126.100.4]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id k72IxvBj018814; Wed, 2 Aug 2006 11:59:58 -0700 Received: by alvh.no-ip.org (Postfix, from userid 1000) id 5D62DC45036; Wed, 2 Aug 2006 14:59:52 -0400 (CLT) Date: Wed, 2 Aug 2006 14:59:52 -0400 From: Alvaro Herrera To: Joe Conway Cc: Tom Lane , pgsql-patches@postgreSQL.org Subject: Re: Values list-of-targetlists patch for comments (was Re: Message-ID: <20060802185952.GD6019@alvh.no-ip.org> Mail-Followup-To: Joe Conway , Tom Lane , pgsql-patches@postgreSQL.org References: <50461.84.63.113.55.1152832991.squirrel@pezone.net> <44B7ADFC.90205@dunslane.net> <44D03D9F.80203@joeconway.com> <15263.1154526181@sss.pgh.pa.us> <44D0AF87.2030304@joeconway.com> <16892.1154528708@sss.pgh.pa.us> <44D0B9C1.2020608@joeconway.com> <17704.1154534183@sss.pgh.pa.us> <44D0EA83.7050702@joeconway.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44D0EA83.7050702@joeconway.com> User-Agent: Mutt/1.5.12-2006-07-14 X-Virus-Scanned: ClamAV version 0.88.3, clamav-milter version 0.88.3 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Wed, 02 Aug 2006 11:59:58 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.862 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200608/59 X-Sequence-Number: 20575 Joe Conway wrote: > What if we built an array of A_Const nodes instead of a List? Maybe we > could use something akin to appendStringInfo()/enlargeStringInfo() to > build the array of nodes and enlarge it in chunks. In inval.c you find this: /* * To minimize palloc traffic, we keep pending requests in successively- * larger chunks (a slightly more sophisticated version of an expansible * array). All request types can be stored as SharedInvalidationMessage * records. The ordering of requests within a list is never significant. */ typedef struct InvalidationChunk { struct InvalidationChunk *next; /* list link */ int nitems; /* # items currently stored in chunk */ int maxitems; /* size of allocated array in this chunk */ SharedInvalidationMessage msgs[1]; /* VARIABLE LENGTH ARRAY */ } InvalidationChunk; /* VARIABLE LENGTH STRUCTURE */ Which might give you an idea ... -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.