diff options
author | Robert Haas <rhaas@postgresql.org> | 2019-09-06 08:22:32 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2019-09-06 08:56:45 -0400 |
commit | 62fb12d7e1383905c84436492e1fe841ecc69040 (patch) | |
tree | 67961e4922b2f3b354cae6d9a13814ed580178ea /src/backend/executor/nodeHashjoin.c | |
parent | 4950f09e7ae2f4c311843f1ba56c927f820ff785 (diff) | |
download | postgresql-62fb12d7e1383905c84436492e1fe841ecc69040.tar.gz postgresql-62fb12d7e1383905c84436492e1fe841ecc69040.zip |
When performing a base backup, check for read errors.
The old code didn't differentiate between a read error and a
concurrent truncation. fread reports both of these by returning 0;
you have to use feof() or ferror() to distinguish between them,
which this code did not do.
It might be a better idea to use read() rather than fread() here,
so that we can display a less-generic error message, but I'm not
sure that would qualify as a back-patchable bug fix, so just do
this much for now.
Jeevan Chalke, reviewed by Jeevan Ladhe and by me.
Discussion: http://postgr.es/m/CA+TgmobG4ywMzL5oQq2a8YKp8x2p3p1LOMMcGqpS7aekT9+ETA@mail.gmail.com
Diffstat (limited to 'src/backend/executor/nodeHashjoin.c')
0 files changed, 0 insertions, 0 deletions