"Lampa" <lampacz(at)gmail(dot)com> writes:
> Trying analyze table (ANALYZE TABLE table or VACUUM ANALYZE table) with
> 3051316 rows (displayed size 2521MB in \dt+)
What have you got maintenance_work_mem set to? shared_buffers might
also be interesting.
regards, tom lane