Re: Getting rid of some more lseek() calls

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Getting rid of some more lseek() calls
Date: 2020-02-12 05:42:01
Message-ID: 20200212054201.GE1464@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2020-02-12 05:42:20 Re: [Proposal] Add accumulated statistics for wait event
Previous Message Michael Paquier 2020-02-12 05:28:19 Re: client-side fsync() error handling