Re: Simplified version of read_binary_file (src/backend/utils/adt/genfile.c) - Mailing list pgsql-hackers

From Ranier Vilela
Subject Re: Simplified version of read_binary_file (src/backend/utils/adt/genfile.c)
Date
Msg-id CAEudQAqfY3B64jTtO5M2wJhYEDJQ3Xx+NQV7Z=wcqwLeP64=AQ@mail.gmail.com
Whole thread Raw
In response to Re: Simplified version of read_binary_file (src/backend/utils/adt/genfile.c)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Em sex., 11 de set. de 2020 às 17:44, Tom Lane <tgl@sss.pgh.pa.us> escreveu:
Ranier Vilela <ranier.vf@gmail.com> writes:
> New version, with support to read Virtual File (pipe, FIFO and socket).
> With assert, in case, erroneous, of trying to read a pipe, with offset.

I do agree that it might be worth skipping the fseeko call in the
probably-common case where seek_offset is zero.  Otherwise I don't
see much reason to change what's there.
Tom, if you think it's worth it, I agree with only avoiding syscal fseeko.

regards,
Ranier Vilela
Attachment

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: logtape.c stats don't account for unused "prefetched" block numbers
Next
From: Peter Geoghegan
Date:
Subject: Re: logtape.c stats don't account for unused "prefetched" block numbers