Re: Simplified version of read_binary_file (src/backend/utils/adt/genfile.c)

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Simplified version of read_binary_file (src/backend/utils/adt/genfile.c)
Date: 2020-09-14 22:57:32
Message-ID: CAEudQAqfY3B64jTtO5M2wJhYEDJQ3Xx+NQV7Z=wcqwLeP64=AQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Em sex., 11 de set. de 2020 às 17:44, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> escreveu:

> Ranier Vilela <ranier(dot)vf(at)gmail(dot)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 Content-Type Size
v1-0001-avoid_syscall_fseeko_read_binary_file.patch application/octet-stream 700 bytes

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2020-09-14 22:58:08 Re: logtape.c stats don't account for unused "prefetched" block numbers
Previous Message Peter Geoghegan 2020-09-14 22:54:48 Re: logtape.c stats don't account for unused "prefetched" block numbers