pgsql: Improve tuplestore's error messages for I/O failures.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Improve tuplestore's error messages for I/O failures.
Дата
Msg-id E1WvDxn-0008RI-OV@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Improve tuplestore's error messages for I/O failures.

We should report the errno when we get a failure from functions like
BufFileWrite.  "ERROR: write failed" is unreasonably taciturn for a
case that's well within the realm of possibility; I've seen it a
couple times in the buildfarm recently, in situations that were
probably out-of-disk-space, but it'd be good to see the errno
to confirm it.

I think this code was originally written without assuming that
the buffile.c functions would return useful errno; but most other
callers *are* assuming that, and a quick look at the buffile code
gives no reason to suppose otherwise.

Also, a couple of the old messages were phrased on the assumption
that a short read might indicate a logic bug in tuplestore itself;
but that code's pretty well tested by now, so a filesystem-level
problem seems much more likely.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/6554656ea2043c5bb877b427237dc5ddd7c5e5c8

Modified Files
--------------
src/backend/utils/sort/logtape.c    |    5 +--
src/backend/utils/sort/tuplestore.c |   64 +++++++++++++++++++++++++----------
2 files changed, 47 insertions(+), 22 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Adjust largeobject regression test to leave a couple of LOs behi
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Improve tuplestore's error messages for I/O failures.