Re: Add BufFileRead variants with short read and EOF detection
От | vignesh C |
---|---|
Тема | Re: Add BufFileRead variants with short read and EOF detection |
Дата | |
Msg-id | CALDaNm1tFa6q=fn3k4DgRmSwgtmcPCb_OTEJiyhs5hByg5th7Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Add BufFileRead variants with short read and EOF detection (Peter Eisentraut <peter.eisentraut@enterprisedb.com>) |
Список | pgsql-hackers |
On Wed, 28 Dec 2022 at 16:17, Peter Eisentraut <peter.eisentraut@enterprisedb.com> wrote: > > Most callers of BufFileRead() want to check whether they read the full > specified length. Checking this at every call site is very tedious. > This patch provides additional variants BufFileReadExact() and > BufFileReadMaybeEOF() that include the length checks. > > I considered changing BufFileRead() itself, but this function is also > used in extensions, and so changing the behavior like this would create > a lot of problems there. The new names are analogous to the existing > LogicalTapeReadExact(). The patch does not apply on top of HEAD as in [1], please post a rebased patch: === Applying patches on top of PostgreSQL commit ID e351f85418313e97c203c73181757a007dfda6d0 === === applying patch ./0001-Add-BufFileRead-variants-with-short-read-and-EOF-det.patch patching file src/backend/access/gist/gistbuildbuffers.c ... Hunk #1 FAILED at 38. 1 out of 1 hunk FAILED -- saving rejects to file src/include/storage/buffile.h.rej [1] - http://cfbot.cputube.org/patch_41_4089.log Regards, Vignesh
В списке pgsql-hackers по дате отправления: