Re: Getting rid of some more lseek() calls - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Getting rid of some more lseek() calls
Date
Msg-id 20200212054201.GE1464@paquier.xyz
Whole thread Raw
In response to Re: Getting rid of some more lseek() calls  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: Getting rid of some more lseek() calls
List pgsql-hackers
On Tue, Feb 11, 2020 at 06:04:09PM +1300, Thomas Munro wrote:
> lseek(SEEK_END) seems to be nearly twice as fast as fstat() if you
> just call it in a big loop, on Linux and FreeBSD (though I didn't
> investigate exactly why, mitigations etc, it certainly returns more
> stuff so there's that).

Interesting.  What of Windows?  We've had for some time now problem
with fetching the size of files larger than 4GB (COPY, dumps..).  I am
wondering if we could not take advantage of that for those cases:
https://www.postgresql.org/message-id/15858-9572469fd3b73263@postgresql.org
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: client-side fsync() error handling
Next
From: Craig Ringer
Date:
Subject: Re: [Proposal] Add accumulated statistics for wait event