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 <alvhe...@commandprompt.com> The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers