Re: [HACKERS] Fix Error Message for allocate_recordbuf() Failure

2016-09-21 Thread Robert Haas
On Tue, Sep 20, 2016 at 9:25 PM, Michael Paquier wrote: > On Wed, Sep 21, 2016 at 12:32 AM, Robert Haas wrote: >> For what it's worth, I think it's fine. Good error messages are a useful >> thing. >> >> More generally, I think the whole patch

Re: [HACKERS] Fix Error Message for allocate_recordbuf() Failure

2016-09-20 Thread Michael Paquier
On Wed, Sep 21, 2016 at 10:25 AM, Michael Paquier wrote: > On Wed, Sep 21, 2016 at 12:32 AM, Robert Haas wrote: >> For what it's worth, I think it's fine. Good error messages are a useful >> thing. >> >> More generally, I think the whole patch

Re: [HACKERS] Fix Error Message for allocate_recordbuf() Failure

2016-09-20 Thread Michael Paquier
On Wed, Sep 21, 2016 at 12:32 AM, Robert Haas wrote: > 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. Hm. I'd think that it is still more portable to just

Re: [HACKERS] Fix Error Message for allocate_recordbuf() Failure

2016-09-20 Thread Robert Haas
On Mon, Jul 11, 2016 at 12:04 AM, Michael Paquier wrote: > On Sat, Jul 9, 2016 at 2:58 AM, Shoaib Lari wrote: >> Besides making the error message more informative, we had to modify >> allocate_recordbuf() to return the actual number of bytes that were

Re: [HACKERS] Fix Error Message for allocate_recordbuf() Failure

2016-07-12 Thread Shoaib Lari
Thank you for the feedback. We had encountered this error message when allocating a record buf of 344 bytes. The message "record length 344 at %X/%X too long" along with the comment /* We treat this as a "bogus data" condition */ masked the OOM condition, implying an error in log record size

Re: [HACKERS] Fix Error Message for allocate_recordbuf() Failure

2016-07-10 Thread Craig Ringer
On 11 July 2016 at 12:04, Michael Paquier wrote: > On Sat, Jul 9, 2016 at 2:58 AM, Shoaib Lari wrote: > > Besides making the error message more informative, we had to modify > > allocate_recordbuf() to return the actual number of bytes that were

Re: [HACKERS] Fix Error Message for allocate_recordbuf() Failure

2016-07-10 Thread Michael Paquier
On Sat, Jul 9, 2016 at 2:58 AM, Shoaib Lari 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