Re: offline consistency check and info on attributes

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: offline consistency check and info on attributes
Дата
Msg-id 1303755940-sup-9118@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: offline consistency check and info on attributes  (Tomas Vondra <tv@fuzzy.cz>)
Список pgsql-hackers
Excerpts from Tomas Vondra's message of lun abr 25 14:50:18 -0300 2011:

> Yes, I know the tuple length is in HeapTupleHeader (and I'm already
> checking that), but that does not allow to check lengths of the
> individual columns, especially those with varlena types.
> 
> That's a very annoying type of corruption, because the queries that do
> not touch such columns seem to work fine, but once you attempt to access
> the corrupted column you'll get something like this:
> 
> pg_dump: SQL command failed
> pg_dump: Error message from server: ERROR:  invalid memory alloc
> request size 4294967293

Yeah, I agree with this being less than ideal.  However, as you
conclude, I don't think it's really workable to check this without
support from the running system.  I wrote a dumb tool to attempt to
detoast all varlena columns, capture exceptions and report them; see the
code here:
http://alvherre.livejournal.com/4404.html
(You need to pass it a table name as a text parameter; that bit is
crap, as it fails for funny names).  Note that this assumes that there
is a function length() for every varlena datatype in the table, which
may not be true for some of them.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Unlogged tables, persistent kind
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Unfriendly handling of pg_hba SSL options with SSL off