Return-Path: pg_adm@postgres.berkeley.edu
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA23336; Tue, 27 Jul 93 21:38:49 -0700
Date: Tue, 27 Jul 93 21:38:49 -0700
From: "David J. Hughes" <bambi@Bond.edu.au>
Subject: Swelling backend.
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
To: postgres@postgres.Berkeley.EDU
Message-Id: <Pine.3.07.9307281444.D176-b100000@fiddich.its.Bond.edu.au>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII



One piece of code I've been working on that utilises Postgres is a daemon
process that hangs off a UDP socket and receives "data" from other nodes on
our network.  Upon receipt of a packet, it talks to Postgres for various
things.  Speed is important here so I leave the connection open while
waiting for the next packet to turn up (could be nanoseconds or hours
away).

I've noticed that as time passes, the backend grows in size.  I'm not sure
if it's a leak or if I'm not clearing something via libpq.  I have ensured
that any retrieve is followed by a PQclear of the portal in use.

Is there anything else that requires clearing or closing to stop this
behaviour?  Has anyone else noticed swelling backends if they remain open
and active for a long time (my tests have generated a query rate which
averages out to about one every 3 seconds sustained for half an hour or so
(although you can see growth within a few quick bursts of 25 queries)). 

Any clues?  The backend eventually dies due to lack of memory so I'd like
to resolve this without PQreset'ing and forcing a new backend (and the
resultant performance hit).



   ___                                  David J. Hughes    bambi@Bond.edu.au
  /   \                /  /    /        
 /  __/ __   __   ____/  /    / __            Senior Network Programmer
/    \ /  \ /  \ /   /  /    / /  \  /     Information Technology Services
\____/ \__//   / \__/   \___/ /   / /   Qld. 4229  AUSTRALIA  (+61 75 951450)


