Re: unexpected data beyond EOF and character encoding

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: unexpected data beyond EOF and character encoding
Дата
Msg-id
24872.1175094150@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Strange behaviour under heavy load "Dmitry Koterov" <dmitry@koterov.ru>
Re: Strange behaviour under heavy load Oleg Bartunov <oleg@sai.msu.su>
Re: Strange behaviour under heavy load "Dmitry Koterov" <dmitry@koterov.ru>
Re: Strange behaviour under heavy load "Dmitry Koterov" <dmitry@koterov.ru>
Re: Strange behaviour under heavy load "Dmitry Koterov" <dmitry@koterov.ru>
unexpected data beyond EOF and character encoding Jaime Silvela <JSilvela@Bear.com>
Re: unexpected data beyond EOF and character encoding Tom Lane <tgl@sss.pgh.pa.us>
Re: unexpected data beyond EOF and character encoding Jaime Silvela <JSilvela@Bear.com>
Re: unexpected data beyond EOF and character encoding Tom Lane <tgl@sss.pgh.pa.us>
Re: unexpected data beyond EOF and character encoding Jaime Silvela <JSilvela@Bear.com>
Re: unexpected data beyond EOF and character encoding Tom Lane <tgl@sss.pgh.pa.us>
Re: unexpected data beyond EOF and character encoding Jaime Silvela <JSilvela@Bear.com>
Re: unexpected data beyond EOF and character encoding Tom Lane <tgl@sss.pgh.pa.us>
Jaime Silvela  writes:
> The kernel is Linux 2.6.5

2.6.5.what (give us full uname -a output please)?  On what hardware?
If memory serves, we had some reason to think that it only occurred on
specific 64-bit multi-CPU platforms, so I'm not just asking idly.
The error check was put in as a consequence of this thread:
http://archives.postgresql.org/pgsql-admin/2006-09/msg00250.php

> So I take it that this happens on the restore part, not the dump part then?

It's definitely a write failure not a read failure.  Per the code comments:

         * We get here only in the corner case where we are trying to extend
         * the relation but we found a pre-existing buffer marked BM_VALID.
         * This can happen because mdread doesn't complain about reads beyond
         * EOF --- which is arguably bogus, but changing it seems tricky ---
         * and so a previous attempt to read a block just beyond EOF could
         * have left a "valid" zero-filled buffer.  Unfortunately, we have
         * also seen this case occurring because of buggy Linux kernels that
         * sometimes return an lseek(SEEK_END) result that doesn't account for
         * a recent write.  In that situation, the pre-existing buffer would
         * contain valid data that we don't want to overwrite.  Since the
         * legitimate cases should always have left a zero-filled buffer,
         * complain if not PageIsNew.

			regards, tom lane
В списке pgsql-general по дате отправления
От: Jaime Silvela
Дата:
От: Tom Lane
Дата:
FAQ