pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: Joe Conway <mail@joeconway.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-patches@postgreSQL.org
Subject: Re: Values list-of-targetlists patch for comments (was Re:
Date: Wed, 2 Aug 2006 14:59:52 -0400
Message-ID: <20060802185952.GD6019@alvh.no-ip.org> (raw)
In-Reply-To: <44D0EA83.7050702@joeconway.com>
References: <50461.84.63.113.55.1152832991.squirrel@pezone.net>
	<ECCAAC0A3182895D3D12B0E8@[172.26.14.247]>
	<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>

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.



view thread (61+ messages)  latest in thread

Message-ID: <20060802185952.GD6019@alvh.no-ip.org>
Permalink:  ../20060802185952.GD6019@alvh.no-ip.org/
Also on:    postgresql.org/message-id/20060802185952.GD6019@alvh.no-ip.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: alvherre@commandprompt.com, mail@joeconway.com, tgl@sss.pgh.pa.us, pgsql-patches@postgreSQL.org
  Subject: Re: Values list-of-targetlists patch for comments (was Re:
  In-Reply-To: <20060802185952.GD6019@alvh.no-ip.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox