在存档wal日志上启用gzip后无法停止postgres

时间:2015-08-20 06:34:55

标签: database postgresql

我在存档的WAL文件上启用了gzip。但是之后,我无法停止数据库。 我相信它等待所有会话停止,但是由于从未创建pg_xlog / 000000010000002D000000A4,因此PID 20100永远不会停止。 我该如何解决这个问题?

-bash-4.1$ ps x
  PID TTY      STAT   TIME COMMAND
19807 ?        S      0:00 sshd: postgres@pts/2
19808 pts/2    Ss     0:00 -bash
19923 pts/2    S      0:00 /opt/PostgreSQL/9.4/bin/postgres
19924 ?        Ss     0:00 postgres: logger process
19926 ?        Ss     0:02 postgres: checkpointer process
19927 ?        Ss     0:00 postgres: writer process
19928 ?        Ss     0:00 postgres: wal writer process
19929 ?        Ss     0:00 postgres: autovacuum launcher process
19930 ?        Ss     0:00 postgres: archiver process   archiving 000000010000002D000000A4
19931 ?        Ss     0:00 postgres: stats collector process
20050 pts/2    S+     0:00 /bin/bash /opt/PostgreSQL/9.4/bin/psql
20052 pts/2    S+     0:00 /opt/PostgreSQL/9.4/bin/psql.bin
20055 ?        Ss     0:00 postgres: postgres sorriso [local] idle
20059 ?        S      0:00 sshd: postgres@pts/5
20060 pts/5    Ss     0:00 -bash
20100 ?        S      0:00 sh -c gzip < pg_xlog/000000010000002D000000A4 > /mnt/nfs/archive/000000010000002D000000A4
20101 ?        D      0:00 gzip
20113 pts/5    R+     0:00 ps x
-bash-4.1$ pg_ctl stop
waiting for server to shut down............................................................... failed
pg_ctl: server does not shut down
HINT: The "-m fast" option immediately disconnects sessions rather than
waiting for session-initiated disconnection.
-bash-4.1$ pg_ctl stop
waiting for server to shut down............................................................... failed
pg_ctl: server does not shut down
HINT: The "-m fast" option immediately disconnects sessions rather than
waiting for session-initiated disconnection.
-bash-4.1$ echo $PGDATA
/opt/PostgreSQL/9.4/data
-bash-4.1$ pg_ctl stop -m smart
waiting for server to shut down............................................................... failed
pg_ctl: server does not shut down
HINT: The "-m fast" option immediately disconnects sessions rather than
waiting for session-initiated disconnection.
-bash-4.1$ pg_ctl stop -m fast
waiting for server to shut down............................................................... failed
pg_ctl: server does not shut down
-bash-4.1$

0 个答案:

没有答案