0ut of Memory Error during Vacuum Analyze

Поиск
Список
Период
Сортировка
Искать

0ut of Memory Error during Vacuum Analyze

От:
"Tomeh, Husam" <htomeh@firstam.com>
Дата:
 
This is the second time I'm getting out of memory error when I start a
database vacuum or try to vacuum any table. Note this machine has been
used for data load batch purposes. 

=# vacuum analyze code;
ERROR:  out of memory
DETAIL:  Failed on request of size 1073741820.

I'm running Postgres 8.1.1 on RedHat 2.6 kernel (HP server). 
My maintenance work area never been changed. It's set to 1GB.
(maintenance_work_mem = 1048576). Physical memory: 32 GB.  

Bouncing the database does not help. 

Two workarounds I have used so far:

  1) Decreasing the maintenance_work_mem to 512MB, vacuum analyze would
work just fine.

Or 

  2) Bouncing the server (maintaining the original 1GB
maintenance_work_mem) would also work.

I have not had that error on the production instances (which are
identical copies of the loading instance) - only the loading instance..

Any explanation as to why and how to avoid that ?  Thanks


----
 
    Husam  
**********************************************************************
This message contains confidential information intended only for the use of the addressee(s) named above and may contain information that is legally privileged.  If you are not the addressee, or the person responsible for delivering it to the addressee, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited.  If you have received this message by mistake, please immediately notify us by replying to the message and delete the original message immediately thereafter.

Thank you.

                                   FADLD Tag
**********************************************************************

Re: 0ut of Memory Error during Vacuum Analyze

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Tomeh, Husam"  writes:
> =# vacuum analyze code;
> ERROR:  out of memory
> DETAIL:  Failed on request of size 1073741820.

That looks a whole lot like a corrupt-data issue.  The apparent
dependency on maintenance_work_mem is probably illusory --- I suspect
some of your trials are selecting the corrupted row to use in the
ANALYZE stats, and others are randomly selecting other rows.

If you are able to pg_dump the table in question then this theory is
wrong, but I'd suggest trying that first.

			regards, tom lane
FAQ