On Mon, Jul 11, 2016 at 12:04 AM, Michael Paquier
<michael.paqu...@gmail.com> wrote:
> On Sat, Jul 9, 2016 at 2:58 AM, Shoaib Lari <sl...@pivotal.io> wrote:
>> Besides making the error message more informative, we had to modify
>> allocate_recordbuf() to return the actual number of bytes that were being
>> allocated.
> -       report_invalid_record(state, "record length %u at %X/%X too long",
> -                             total_len,
> -                             (uint32) (RecPtr >> 32), (uint32) RecPtr);
> +       report_invalid_record(state,
> +                             "cannot allocate %u bytes for record
> length %u at %X/%X",
> +                             newSizeOut, total_len, (uint32) (RecPtr >> 32),
> +                             (uint32) RecPtr);
> It does not look like a good idea to me to complicate the interface of
> allocate_recordbuf just to make more verbose one error message, ...

For what it's worth, I think it's fine.  Good error messages are a useful thing.

More generally, I think the whole patch looks good and should be committed.

Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to