Re: CommitDelay performance improvement - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: CommitDelay performance improvement
Date
Msg-id 200102231823.NAA16833@candle.pha.pa.us
Whole thread Raw
In response to CommitDelay performance improvement  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: CommitDelay performance improvement  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: CommitDelay performance improvement
Next
From: Pam Withnall
Date:
Subject: ExecOpenScanR: failed to open relation