Re: 0ut of Memory Error during Vacuum Analyze and Create Index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Tomeh, Husam" <htomeh(at)firstam(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: 0ut of Memory Error during Vacuum Analyze and Create Index
Date: 2006-02-14 23:49:18
Message-ID: 24285.1139960958@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Tomeh, Husam" <htomeh(at)firstam(dot)com> writes:
> mtrac=# show maintenance_work_mem ;
> maintenance_work_mem
> ----------------------
> 1048576 <======
> (1 row)

> mtrac=#
> mtrac=#
> mtrac=# create index mort_ht on mortgage(county_id,mtg_rec_dt);
> ERROR: out of memory <===
> DETAIL: Failed on request of size 134217728. <===

It would be useful to look at the detailed allocation info that this
(should have) put into the postmaster log. Also, if you could get
a stack trace back from the error, that would be even more useful.
To do that,
* start psql
* determine PID of connected backend (use pg_backend_pid())
* in another window, as postgres user,
gdb /path/to/postgres backend-PID
gdb> break errfinish
gdb> cont
* issue failing command in psql
* when breakpoint is reached,
gdb> bt
... stack trace printed here ...
gdb> q

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Pradeep Parmar 2006-02-15 07:29:47 could not send data to client: Broken pipe
Previous Message Tomeh, Husam 2006-02-14 23:40:17 Re: 0ut of Memory Error during Vacuum Analyze and