服务器在pg_dump时意外关闭了连接

时间:2015-08-09 14:19:24

标签: postgresql

我在我的vps服务器上运行pg_dump,它让我错误:

pg_dump: [archiver (db)] query failed: server closed the connection unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.
pg_dump: [archiver (db)] query was: SELECT
  ( SELECT alias FROM pg_catalog.ts_token_type('22171'::pg_catalog.oid) AS t
    WHERE t.tokid = m.maptokentype ) AS tokenname,
  m.mapdict::pg_catalog.regdictionary AS dictname
FROM pg_catalog.pg_ts_config_map AS m
WHERE m.mapcfg = '22172'
ORDER BY m.mapcfg, m.maptokentype, m.mapseqno

然后我注意到上面错误的sql:

    SELECT
      ( SELECT alias FROM pg_catalog.ts_token_type('22171'::pg_catalog.oid) AS t
        WHERE t.tokid = m.maptokentype ) AS tokenname,
      m.mapdict::pg_catalog.regdictionary AS dictname
    FROM pg_catalog.pg_ts_config_map AS m
    WHERE m.mapcfg = '22172'
    ORDER BY m.mapcfg, m.maptokentype, m.mapseqno

所以我尝试在SELECT alias FROM pg_catalog.ts_token_type('22171'::pg_catalog.oid)

上运行psql

所以它让我错误:

pzz_development=# SELECT alias FROM pg_catalog.ts_token_type('22171'::pg_catalog.oid);
server closed the connection unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!> \q

如何找出问题并正确转储数据?

编辑:

然后我在/var/log/postgresql/postgresql-9.3-main.log

检查postgresql日志
2015-08-10 16:22:49 CST LOG:  server process (PID 4029) was terminated by signal 11: Segmentation fault
2015-08-10 16:22:49 CST DETAIL:  Failed process was running: SELECT
      ( SELECT alias FROM pg_catalog.ts_token_type('22171'::pg_catalog.oid) AS t
        WHERE t.tokid = m.maptokentype ) AS tokenname,
      m.mapdict::pg_catalog.regdictionary AS dictname
    FROM pg_catalog.pg_ts_config_map AS m
    WHERE m.mapcfg = '22172'
    ORDER BY m.mapcfg, m.maptokentype, m.mapseqno
2015-08-10 16:22:49 CST LOG:  terminating any other active server processes
2015-08-10 16:22:49 CST WARNING:  terminating connection because of crash of another server process
2015-08-10 16:22:49 CST DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2015-08-10 16:22:49 CST HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2015-08-10 16:22:49 CST LOG:  all server processes terminated; reinitializing
2015-08-10 16:22:49 CST LOG:  database system was interrupted; last known up at 2015-08-10 16:22:45 CST
2015-08-10 16:22:50 CST LOG:  database system was not properly shut down; automatic recovery in progress
2015-08-10 16:22:50 CST LOG:  unexpected pageaddr 0/2AE6000 in log segment 000000010000000000000004, offset 11427840
2015-08-10 16:22:50 CST LOG:  redo is not required
2015-08-10 16:22:50 CST LOG:  MultiXact member wraparound protections are now enabled
2015-08-10 16:22:50 CST LOG:  autovacuum launcher started
2015-08-10 16:22:50 CST LOG:  database system is ready to accept connections

0 个答案:

没有答案