Dear, Psqlers, I encountered an out of memory error during executing un INSERT into table1(v1,v2,v3) SELECT c1,c2,c3 from table2 where ..... The recordset of Select query is around 30M record. And I got following Message :
------- ERROR: out of memoryDETAIL: Failed on request of size 40.' in 'insert into ------------------- I found my postgresql process used up 3G Memory . I guess postgresql try to first get all the result of select , and then insert into Table . As the process can't allocate more memory for result of select , and then I got OOM error. Can someone verify my guess ? Or what else could be the reason of OOM ? Is there any other ways to still insert same amount of data and avoid this OOM error ? Thanks , -- Yue