0

When I'm executing VACUUM (VERBOSE, ANALYZE) table_name;

I get error

ERROR:  invalid memory alloc request size 2466264688
CONTEXT:  while vacuuming index "idx_name" of relation "public.table_name"

My maintenance_work_mem is 64mb, table contains about 50 million rows
This table has several indexes, other indexes are vacuumed fine
Any thoughts on what might be the cause of this error?

Nikita Davydov
  • 837
  • 7
  • 18
  • `maintenance_work_mem` is too small. Review Page 9: https://cloud.google.com/solutions/optimizing-monitoring-troubleshooting-vacuum-operations-postgresql.pdf – John Hanley May 10 '21 at 18:24
  • There's the phrase that vacuum operation creates batches of tuples by storing 8 bytes of information and 64 mb can accommodate eight million entries. So why it's too small? – Nikita Davydov May 11 '21 at 09:35
  • @JohnHanley Increased `maintenance_work_mem` to 3gb - it didn't help – Nikita Davydov May 11 '21 at 11:13

0 Answers0