Re: Fix Error Message for allocate_recordbuf() Failure
От | Robert Haas |
---|---|
Тема | Re: Fix Error Message for allocate_recordbuf() Failure |
Дата | |
Msg-id | CA+TgmoagYiUmz0eERRhYPuGwtjV=2zH_1M5redKdPjk++FNkPw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Fix Error Message for allocate_recordbuf() Failure (Michael Paquier <michael.paquier@gmail.com>) |
Ответы |
Re: Fix Error Message for allocate_recordbuf() Failure
|
Список | pgsql-hackers |
On Mon, Jul 11, 2016 at 12:04 AM, Michael Paquier <michael.paquier@gmail.com> wrote: > On Sat, Jul 9, 2016 at 2:58 AM, Shoaib Lari <slari@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
В списке pgsql-hackers по дате отправления: