From: | Robert Haas <rhaas(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: When performing a base backup, check for read errors. |
Date: | 2019-09-06 13:11:57 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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.
Branch
------
REL9_4_STABLE
Modified Files
--------------
src/backend/replication/basebackup.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2019-09-06 13:28:56 | Re: pgsql: Doc: remove some long-obsolete information from installation.sgm |
Previous Message | Peter Eisentraut | 2019-09-06 11:53:20 | Re: pgsql: Doc: remove some long-obsolete information from installation.sgm |