Re: PostgreSQL 8.0.6 crash

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Mark Woodward <pgsql(at)mohawksoft(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: PostgreSQL 8.0.6 crash
Date: 2006-02-10 15:55:15
Message-ID: 20060210155515.GN57845@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 09, 2006 at 03:13:22PM -0500, Greg Stark wrote:
> Stephen Frost <sfrost(at)snowman(dot)net> writes:
>
> > * Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> > > Greg Stark <gsstark(at)mit(dot)edu> writes:
> > > > It doesn't seem like a bad idea to have a max_memory parameter that if a
> > > > backend ever exceeded it would immediately abort the current
> > > > transaction.
> > >
> > > See ulimit (or local equivalent).
> >
> > As much as setting ulimit in shell scripts is fun, I have to admit that
> > I really don't see it happening very much.
>
> For one thing it requires admin access to the startup scripts to arrange this.
> And it's always cluster-wide.
>
> Having a GUC parameter would mean it could be set per-session. Even if the GUC
> parameter were just implemented by calling setrlimit it might be useful.

Trying to tune work_mem is extremely difficult in PostgreSQL, because
you are constantly running the risk of sending the server into a
swap-storm. Having a set-able per-backend memory limit would allow a lot
more flexability in setting work_mem, because you could now ensure that
you wouldn't push the server into serious swapping.

Even better would be a means to set a cluster-wide memory limit, but of
course that's substantially more work.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2006-02-10 16:01:18 Re: PostgreSQL 8.0.6 crash
Previous Message Bruce Momjian 2006-02-10 15:54:36 Re: FW: PGBuildfarm member snake Branch HEAD Status changed