Greg Spiegelberg <gspiegelberg@cranel.com> writes:
> The problem is that the "VACUUM ANALYZE;" results in a
> ERROR: Memory exhausted in AllocSetAlloc(1048575996)
If you do VACUUM and ANALYZE separately, which part shows the failure?
(I'm betting on ANALYZE.) And have you narrowed down which table it
fails on? (Adding the VERBOSE option would let you track that.)
This looks to me like a data-corruption problem, specifically a bad
value of the length word in a variable-length field. (Adjacent data
is probably clobbered too, but the length problem is showing itself
first.) See previous threads in the archives for general advice about
tracking down broken rows and getting rid of them.
regards, tom lane