Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c xlog.c)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alfred Perlstein <bright(at)wintelcom(dot)net>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Don Baccus <dhogaza(at)pacifier(dot)com>, Vadim Mikheev <vmikheev(at)sectorbase(dot)com>, Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, peter_e(at)gmx(dot)net, pgsql-hackers(at)postgresql(dot)org
Subject: Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c xlog.c)
Date: 2000-11-16 21:31:37
Message-ID: 22845.974410297@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alfred Perlstein <bright(at)wintelcom(dot)net> writes:
> It might make more sense to keep a private copy of the last time
> the file was modified per-backend by that particular backend and
> a timestamp of the last fsync shared globally so one can forgo the
> fsync if "it hasn't been dirtied by me since the last fsync"
> This would provide a rendevous point for the fsync call although
> cost more as one would need to periodically call gettimeofday to
> set the modified by me timestamp as well as the post-fsync shared
> timestamp.

That's the hard way to do it. We just need to keep track of the
endpoint of the log as of the last fsync. You need to fsync (after
returning from sleep()) iff your commit record position > fsync
endpoint. No need to ask the kernel for time-of-day.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mikheev, Vadim 2000-11-16 21:31:54 RE: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c xlog.c)
Previous Message Alfred Perlstein 2000-11-16 21:27:54 Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c xlog.c)