Re: CommitDelay performance improvement

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Vadim Mikheev <vadim4o(at)email(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: CommitDelay performance improvement
Date: 2001-02-23 18:23:49
Message-ID: 200102231823.NAA16833@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Looking at the XLOG stuff, I notice that we already have a field
> (logRec) in the per-backend PROC structures that shows whether a
> transaction is currently in progress with at least one change made
> (ie at least one XLOG entry written).
>
> It would be very easy to extend the existing code so that the commit
> delay is not done unless there is at least one other backend with
> nonzero logRec --- or, more generally, at least N other backends with
> nonzero logRec. We cannot tell if any of them are actually nearing
> their commits, but this seems better than just blindly waiting. Larger
> values of N would presumably improve the odds that at least one of them
> is nearing its commit.

Why not just set a flag in there when someone nears commit and clear
when they are about to commit?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 2001-02-23 18:25:55 beta5 packages ...
Previous Message Bruce Momjian 2001-02-23 18:10:04 Re: Lock structures