pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Vincent Dautremont <vincent@searidgetech.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: out of memory error
Date: Wed, 23 May 2012 17:33:29 -0400
Message-ID: <12774.1337808809@sss.pgh.pa.us> (raw)
In-Reply-To: <CAA4Vp48BJk1G+DG89Q+hCk_R=9ONp1Dti4MCSfUeZ3np0M0j+g@mail.gmail.com>
References: <CAA4Vp4_pD3tc8dT8rtdPjO4vQfW+eyuNpYb72HPYYRokdPHS7A@mail.gmail.com>
	<3902.1337708023@sss.pgh.pa.us>
	<CAA4Vp48tDW5vRA3t=WqEJzwYfDY1wmZ=YwDgPkaZ8ktMwUsUaQ@mail.gmail.com>
	<5105.1337711403@sss.pgh.pa.us>
	<CAA4Vp48agd55BnZDtfAOQrDAJqxy=+Gy1c=kxY6V9NAruFbmaQ@mail.gmail.com>
	<7269.1337717095@sss.pgh.pa.us>
	<CAA4Vp4-nU6qa6r0NE314oWpM3eim19h4k57NAu4XCq18yN2qiw@mail.gmail.com>
	<4392.1337786802@sss.pgh.pa.us>
	<CAA4Vp48BJk1G+DG89Q+hCk_R=9ONp1Dti4MCSfUeZ3np0M0j+g@mail.gmail.com>

Vincent Dautremont <vincent@searidgetech.com> writes:
> you were right,
> I do see those CREATE OR REPLACE FUNCTION a bit more than 1 per second
> (approx. 12 times for 10 seconds)

Hah.  Complain to the rubyrep people.  It's most likely just a thinko
about where they should issue that command.  If they actually are
changing the function text from one issuance to the next, they would be
well advised to think of a better way to deal with whatever they're
doing that for; it's going to be quite inefficient even without
considering the effects of this leak.

> I don't know a lot about the internal of rubyrep, but do you think this is
> not a normal behaviour from a postgresql server point of view ?

It's not.  We have plugged that leak, I think, as of 9.1; but the fact
that it took us this long to notice the leak shows that constant
replacement of a function is not a common usage.  All the server's
internal caching related to functions is designed around the assumption
that functions aren't redefined too often.

If you can't get the rubyrep people to fix their code, updating to PG
9.1 is a possible workaround.

			regards, tom lane



view thread (42+ messages)  latest in thread

Message-ID: <12774.1337808809@sss.pgh.pa.us>
Permalink:  ../12774.1337808809@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/12774.1337808809@sss.pgh.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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, vincent@searidgetech.com
  Subject: Re: out of memory error
  In-Reply-To: <12774.1337808809@sss.pgh.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