fix "Success" error messages - Mailing list pgsql-hackers

From Peter Eisentraut
Subject fix "Success" error messages
Date
Msg-id 5de61b6b-8be9-7771-0048-860328efe027@2ndquadrant.com
Whole thread Raw
Responses Re: fix "Success" error messages
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Replacing the EDH SKIP primes
Next
From: Stephen Frost
Date:
Subject: Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions