letheanwater 发表于 2014-07-17 14:48

Postgresql9.1.6在大量进行insert和空间查询时 内存溢出的问题

目前是这样的,要做一个网络分析。所以会有大量的空间查询和insert操作进行。
发现在大量操作时,会导致系统内存溢出,进而数据库的progress就crash了。无法再连。
下面是截取的日志,这个上面是大量的SPI TupTable这样的语句,非常多。

      SPI TupTable: 8192 total in 1 blocks; 6824 free (0 chunks); 1368 used
      SPI TupTable: 8192 total in 1 blocks; 6824 free (0 chunks); 1368 used
      SPI TupTable: 8192 total in 1 blocks; 6824 free (0 chunks); 1368 used
MessageContext: 24576 total in 2 blocks; 19128 free (6 chunks); 5448 used
Operator class cache: 8192 total in 1 blocks; 4872 free (0 chunks); 3320 used
smgr relation table: 8192 total in 1 blocks; 760 free (0 chunks); 7432 used
TransactionAbortContext: 32768 total in 1 blocks; 32752 free (0 chunks); 16 used
Portal hash: 8192 total in 1 blocks; 3912 free (0 chunks); 4280 used
PortalMemory: 8192 total in 1 blocks; 7768 free (1 chunks); 424 used
    PortalHeapMemory: 7168 total in 3 blocks; 1640 free (0 chunks); 5528 used
      ExecutorState: 32832 total in 3 blocks; 5384 free (1 chunks); 27448 used
LOG:server process (PID 11452) was terminated by exception 0xC0000005
HINT:See C include file "ntstatus.h" for a description of the hexadecimal value.
LOG:terminating any other active server processes
WARNING:terminating connection because of crash of another server process
DETAIL:The postmaster has commanded this server process to roll back the current transaction and e
xit, because another server process exited abnormally and possibly corrupted shared memory.
HINT:In a moment you should be able to reconnect to the database and repeat your command.
WARNING:terminating connection because of crash of another server process
DETAIL:The postmaster has commanded this server process to roll back the current transaction and e
xit, because another server process exited abnormally and possibly corrupted shared memory.
HINT:In a moment you should be able to reconnect to the database and repeat your command.
LOG:all server processes terminated; reinitializing
LOG:database system was interrupted; last known up at 2014-07-17 13:46:05 HKT
LOG:database system was not properly shut down; automatic recovery in progress
LOG:redo starts at 1/D104A18
LOG:record with zero length at 1/D10C980
LOG:redo done at 1/D10C940
LOG:last completed transaction was at log time 2014-07-17 13:57:03.486+08
LOG:database system is ready to accept connections
LOG:autovacuum launcher started


还请大家不吝赐教啊。

asdf2110 发表于 2014-07-17 21:13

报一下具体啊
操作系统版本,内存大小,cpu核数,数据量大小,数据库shared_buffers, work_mem 等等

回复 1# letheanwater


   

pg2pg 发表于 2014-07-21 11:21

肯定你用了C语言写的扩展,而那个扩展里面有bug,从异常看应该是访问非法内存位置。
页: [1]
查看完整版本: Postgresql9.1.6在大量进行insert和空间查询时 内存溢出的问题