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
обсуждение исходный текст
Ответ на Re: unexpected data beyond EOF and character encoding  (Jaime Silvela <JSilvela@Bear.com>)
Ответы Re: unexpected data beyond EOF and character encoding  (Jaime Silvela <JSilvela@Bear.com>)
Список pgsql-general
Jaime Silvela <JSilvela@bear.com> 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
Дата:
Сообщение: Re: unexpected data beyond EOF and character encoding
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Slow sequential scans on one DB but not another; fragmentation?