Re: 0ut of Memory Error during Vacuum Analyze and Create Index - Mailing list pgsql-performance

From Tom Lane
Subject Re: 0ut of Memory Error during Vacuum Analyze and Create Index
Date
Msg-id 24285.1139960958@sss.pgh.pa.us
Whole thread Raw
In response to Re: 0ut of Memory Error during Vacuum Analyze and  ("Tomeh, Husam" <htomeh@firstam.com>)
List pgsql-performance
"Tomeh, Husam" <htomeh@firstam.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

pgsql-performance by date:

Previous
From: "Tomeh, Husam"
Date:
Subject: Re: 0ut of Memory Error during Vacuum Analyze and
Next
From: Pradeep Parmar
Date:
Subject: could not send data to client: Broken pipe