pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: When performing a base backup, check for read errors.
7+ messages / 1 participants
[nested] [flat]

* pgsql: When performing a base backup, check for read errors.
@ 2019-09-06 13:11  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Robert Haas @ 2019-09-06 13:11 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ce5542d4025321273d7d0915fb76977937da6994

Modified Files
--------------
src/backend/replication/basebackup.c | 32 +++++++++++++++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: When performing a base backup, check for read errors.
@ 2019-09-06 13:11  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Robert Haas @ 2019-09-06 13:11 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f697c6396d73c1e6d550afed84a6bd8362d9a0d4

Modified Files
--------------
src/backend/replication/basebackup.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: When performing a base backup, check for read errors.
@ 2019-09-06 13:11  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Robert Haas @ 2019-09-06 13:11 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/23df8822601dce04d259fed0326ef28ecc6d1fa0

Modified Files
--------------
src/backend/replication/basebackup.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: When performing a base backup, check for read errors.
@ 2019-09-06 13:11  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Robert Haas @ 2019-09-06 13:11 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/286af0ce12117bc673b97df6228d1a666594d247

Modified Files
--------------
src/backend/replication/basebackup.c | 32 +++++++++++++++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: When performing a base backup, check for read errors.
@ 2019-09-06 13:11  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Robert Haas @ 2019-09-06 13:11 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/61c65cce40e683333c43abb12a9c81ed659c8de0

Modified Files
--------------
src/backend/replication/basebackup.c | 32 +++++++++++++++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: When performing a base backup, check for read errors.
@ 2019-09-06 13:11  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Robert Haas @ 2019-09-06 13:11 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/62fb12d7e1383905c84436492e1fe841ecc69040

Modified Files
--------------
src/backend/replication/basebackup.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: When performing a base backup, check for read errors.
@ 2019-09-06 13:11  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Robert Haas @ 2019-09-06 13:11 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/fbe897134801504a3f1240d61cb78a69bc0850a5

Modified Files
--------------
src/backend/replication/basebackup.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2019-09-06 13:11 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-09-06 13:11 pgsql: When performing a base backup, check for read errors. Robert Haas <rhaas@postgresql.org>
2019-09-06 13:11 pgsql: When performing a base backup, check for read errors. Robert Haas <rhaas@postgresql.org>
2019-09-06 13:11 pgsql: When performing a base backup, check for read errors. Robert Haas <rhaas@postgresql.org>
2019-09-06 13:11 pgsql: When performing a base backup, check for read errors. Robert Haas <rhaas@postgresql.org>
2019-09-06 13:11 pgsql: When performing a base backup, check for read errors. Robert Haas <rhaas@postgresql.org>
2019-09-06 13:11 pgsql: When performing a base backup, check for read errors. Robert Haas <rhaas@postgresql.org>
2019-09-06 13:11 pgsql: When performing a base backup, check for read errors. Robert Haas <rhaas@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox