aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gist.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2019-09-06 08:22:32 -0400
committerRobert Haas <rhaas@postgresql.org>2019-09-06 08:49:56 -0400
commitce5542d4025321273d7d0915fb76977937da6994 (patch)
treeba3c4664de19191c871279fdd85e2b0e44327107 /src/backend/access/gist/gist.c
parentd57a931a85dff67fb7447da5f252bb9a9ecbb6d9 (diff)
downloadpostgresql-ce5542d4025321273d7d0915fb76977937da6994.tar.gz
postgresql-ce5542d4025321273d7d0915fb76977937da6994.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/access/gist/gist.c')
0 files changed, 0 insertions, 0 deletions