Re: reducing statistics write overhead - Mailing list pgsql-hackers

From Tom Lane
Subject Re: reducing statistics write overhead
Date
Msg-id 28445.1220817167@sss.pgh.pa.us
Whole thread Raw
In response to Re: reducing statistics write overhead  (Martin Pihlak <martin.pihlak@gmail.com>)
Responses Re: reducing statistics write overhead  (Magnus Hagander <magnus@hagander.net>)
Re: reducing statistics write overhead  (Martin Pihlak <martin.pihlak@gmail.com>)
List pgsql-hackers
Martin Pihlak <martin.pihlak@gmail.com> writes:
> I had also previously experimented with stat() based polling but ran into
> the same issues - no portable high resolution timestamp on files. I guess
> stat() is unusable unless we can live with 1 second update interval for the
> stats (eg. backend reads the file if it is within 1 second of the request).

> One alternative is to include a timestamp in the stats file header - the
> backend can then wait on that -- check the timestamp, sleep, resend the
> request, loop. Not particularly elegant, but easy to implement. Would this
> be acceptable?

Timestamp within the file is certainly better than trying to rely on
filesystem timestamps.  I doubt 1 sec resolution is good enough, and
I'd also be worried about issues like clock skew between the
postmaster's time and the filesystem's time.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Martin Pihlak
Date:
Subject: Re: reducing statistics write overhead
Next
From: Peter Eisentraut
Date:
Subject: Re: About that CommitFest redirect page ...