fix "Success" error messages
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2019-06-18T12:35:02Z
Lists: pgsql-hackers
Attachments
- 0001-Better-error-messages-for-short-reads-writes-in-SLRU.patch (text/plain) patch 0001
- 0002-Use-consistent-style-for-checking-return-from-system.patch (text/plain) patch 0002
In a case of a corrupted database, I saw an error message like
Could not read from file ...: Success.
from the SLRU module. This is because it checks that it reads or writes
exactly BLCKSZ, and else goes to the error path. The attached patch
gives a different error message in this case.
Because of the structure of this code, we don't have the information to
do the usual "read %d of %zu", but at least this is better than
reporting a "success" error.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Better error messages for short reads/writes in SLRU
- 6ef121647f7f 12.0 landed
- 396e4afdbcbf 13.0 landed
-
pg_checksums: Handle read and write returns correctly
- 3e20b7fa408f 12.0 landed
- 1d7a6e3eb459 13.0 landed
-
Use consistent style for checking return from system calls
- 7e9a4c5c3dca 13.0 landed