Re: Is Patch Ok for deferred trigger disk queue?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Stuart <deststar(at)blueyonder(dot)co(dot)uk>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Is Patch Ok for deferred trigger disk queue?
Date: 2003-07-22 20:45:53
Message-ID: 200307222045.h6MKjrF03510@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


I assume this will not be completed for 7.4. I will keep the emails for
7.5.

One idea I had was to use the existing sort_mem parameter to control
when to force the deferred trigger queue to disk --- it doesn't have
anything to do with sorting, but it does have the same purpose, to force
thing to disk when we consume enough RAM.

---------------------------------------------------------------------------

Bruce Momjian wrote:
>
> Stuart, were are on this patch? Seems we need GUC additions, though I
> can do that for you, and changes to write the head to disk. Was that
> completed?
>
> ---------------------------------------------------------------------------
>
> Stuart wrote:
> > Tom Lane wrote:
> >
> > > Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> writes:
> > >
> > >>As a side question, it looks to me that the code stores the first trigger
> > >>records in memory and then after some point starts storing all new records
> > >>on disk. Is this correct? I'd wonder if that's really what you want in
> > >>general, since I'd think that the earliest ones are the ones you're least
> > >>likely to need until end of transaction (or set constraints in the fk
> > >>case) whereas the most recent ones are possibly going to be immediate
> > >>triggers which you're going to need as soon as the statement is done.
> > >
> > >
> > > Good point. It would be better to push out stuff from the head of the
> > > queue, hoping that stuff near the end might never need to be written
> > > at all.
> > >
> > > regards, tom lane
> > Hmmm.... I see your point. I will change the patch to write the head to
> > disk and reenter when the development branch splits off.
> > Also I've noticed that there is an fd.h which has file routines which I
> > should be using rather than the stdio routines.
> > I will also clean up those errors.
> > Thank you,
> > - Stuart
> >
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 6: Have you searched our list archives?
> >
> > http://archives.postgresql.org
> >
>
> --
> Bruce Momjian | http://candle.pha.pa.us
> pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
> + If your life is a hard drive, | 13 Roberts Road
> + Christ can be your backup. | Newtown Square, Pennsylvania 19073
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Francisco Figueiredo Jr. 2003-07-22 20:47:01 Re: Why select * from function doesn't work when function
Previous Message ivan 2003-07-22 20:44:30 Re: did you read my mails ?