Re: Reducing the memory footprint of large sets of pending triggers

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Reducing the memory footprint of large sets of pending triggers
Date: 2008-10-25 12:36:19
Message-ID: 1224938179.15085.80.camel@ebony.2ndQuadrant
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Thu, 2008-10-23 at 21:32 -0400, Tom Lane wrote:

> We've occasionally talked about allowing pending-trigger-event lists to
> spill to disk when there get to be so many events that it's a memory
> problem. I'm not especially interested in doing that right now, but
> I noticed recently that we could alleviate the problem a lot by adopting
> a more compact representation.

This change goes in the right direction, whereas the spill to disk
probably doesn't, except for certain cases.

A much better objective would be to remove duplicate trigger calls, so
there isn't any build up of trigger data in the first place. That would
apply only to immutable functions. RI checks certainly fall into that
category.

I mention this now in case you have a bright idea about how to do that
quickly and cheaply. Otherwise I'll be looking into that in the next dev
cycle.

--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-10-25 12:48:39 Re: Reducing the memory footprint of large sets of pending triggers
Previous Message Decibel! 2008-10-25 05:38:10 Re: minimal update