pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bertrand Petit <elrond@phoe.frmug.org>
Cc: Joe Conway <mail@joeconway.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: 7.4 beta 1 getting out of swap
Date: Thu, 14 Aug 2003 20:41:52 -0400 (EDT)
Message-ID: <200308150041.h7F0fqn08208@candle.pha.pa.us> (raw)
In-Reply-To: <8826.1060906670@sss.pgh.pa.us>

> I can think of a number of ways we might attack this, but none seem
> especially attractive ---
> 
> 1. Have the index AMs create and switch into a special memory context
> for each call, rather than running in the main execution context.
> I am not sure this is workable at all, since the AMs tend to think they
> can create data structures that will live across calls (for example a
> btree lookup stack).  It'd be the most general solution, if we could
> make it work.
> 
> 2. Modify the index AMs so that the comparison function FmgrInfo is
> preserved across a whole query.  I think this requires changes to the
> index AM API (index_insert for instance has no provision for sharing
> data across multiple calls).  Messy, and would likely mean an initdb.
> It would probably be the fastest answer though, since lookups wouldn't
> need to be done more than once per query.

#2 seems most natural in that it formalizes something that is common for
lots of index methods.

We are only in beta1, so I think we can initdb.

> 3. Set up a long-lived cache internal to the array functions that can
> translate element type OID to the needed lookup data, and won't leak
> memory across repeated calls.  This is not the fastest or most general
> solution, but it seems the most localized and safest fix.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



view thread (9+ messages)  latest in thread

Message-ID: <200308150041.h7F0fqn08208@candle.pha.pa.us>
Permalink:  ../200308150041.h7F0fqn08208@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200308150041.h7F0fqn08208@candle.pha.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: pgman@candle.pha.pa.us, tgl@sss.pgh.pa.us, elrond@phoe.frmug.org, mail@joeconway.com, pgsql-hackers@postgresql.org
  Subject: Re: 7.4 beta 1 getting out of swap
  In-Reply-To: <200308150041.h7F0fqn08208@candle.pha.pa.us>
  References: <8826.1060906670@sss.pgh.pa.us> <200308150041.h7F0fqn08208@candle.pha.pa.us>

* 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