Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> There are more uses of BufFileRead that don't bother to distinguish
> these two cases apart, though -- logtape.c, tuplestore.c,
> gistbuildbuffers.c all do the same.
Yeah. I rather suspect that callers of BufFileRead/Write are mostly
expecting that those functions will throw an ereport() for any interesting
error condition. Maybe we should make it so, instead of piecemeal fixing
the callers?
regards, tom lane