lightdb停不掉FATAL: the database system is shutting down
2022-04-22 05:30:48.790022C lt_recvlogical zjh@postgres [local] walsender idle 55006[2022-04-22 05:30:48 UTC] 0 [201020] ERROR: replication slot "test_for_recvlogical" is active for PID 178953
2022-04-22 05:30:53.799190C lt_recvlogical zjh@postgres [local] walsender idle 55006[2022-04-22 05:30:53 UTC] 0 [201039] ERROR: replication slot "test_for_recvlogical" is active for PID 178953
2022-04-22 05:30:55.549007C @ postmaster 00000[2022-04-16 11:14:13 UTC] 0 [162748] LOG: received fast shutdown request
2022-04-22 05:30:55.549180C @ postmaster 00000[2022-04-16 11:14:13 UTC] 0 [162748] LOG: aborting any active transactions
2022-04-22 05:30:55.549288C @ pg_wait_sampling collector 00000[2022-04-16 11:35:13 UTC] 0 [174802] LOG: pg_wait_sampling collector shutting down
2022-04-22 05:30:55.549294C @ pg_cron launcher 57P01[2022-04-16 11:35:13 UTC] 0 [174801] FATAL: terminating connection due to administrator command
2022-04-22 05:30:55.550215C @ postmaster 00000[2022-04-16 11:14:13 UTC] 0 [162748] LOG: background worker "logical replication launcher" (PID 174803) exited with exit code 1
2022-04-22 05:30:55.550532C @ postmaster 00000[2022-04-16 11:14:13 UTC] 0 [162748] LOG: background worker "pg_cron launcher" (PID 174801) exited with exit code 1
2022-04-22 05:30:58.804144C [unknown] zjh@postgres [local] walsender 57P03[2022-04-22 05:30:58 UTC] 0 [201060] FATAL: the database system is shutting down
2022-04-22 05:31:03.805628C [unknown] zjh@postgres [local] walsender 57P03[2022-04-22 05:31:03 UTC] 0 [201095] FATAL: the database system is shutting down
2022-04-22 05:31:08.808845C [unknown] zjh@postgres [local] walsender 57P03[2022-04-22 05:31:08 UTC] 0 [201114] FATAL: the database system is shutting down
2022-04-22 05:31:13.814499C [unknown] zjh@postgres [local] walsender 57P03[2022-04-22 05:31:13 UTC] 0 [201135] FATAL: the database system is shutting down
2022-04-22 05:31:18.820607C [unknown] zjh@postgres [local] walsender 57P03[2022-04-22 05:31:18 UTC] 0 [201158] FATAL: the database system is shutting down
pstack可以发现进程这个时候空闲。如下:
[zjh@hs-10-20-30-193 bin]$ lsof -i:25432 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME lightdb 162748 zjh 7u IPv4 110347055 0t0 TCP *:25432 (LISTEN) lightdb 162748 zjh 8u IPv6 110347056 0t0 TCP *:25432 (LISTEN) [zjh@hs-10-20-30-193 bin]$ pstack 162748 #0 0x00007ff55c1b0a13 in __select_nocancel () from /lib64/libc.so.6 #1 0x0000000000845a3e in ServerLoop () at postmaster.c:1923 #2 0x000000000084508c in PostmasterMain (argc=3, argv=0xde7ef0) at postmaster.c:1495 #3 0x0000000000753bff in main (argc=3, argv=0xde7ef0) at main.c:231 [zjh@hs-10-20-30-193 bin]$ pstack 162748 #0 0x00007ff55c1b0a13 in __select_nocancel () from /lib64/libc.so.6 #1 0x0000000000845a3e in ServerLoop () at postmaster.c:1923 #2 0x000000000084508c in PostmasterMain (argc=3, argv=0xde7ef0) at postmaster.c:1495 #3 0x0000000000753bff in main (argc=3, argv=0xde7ef0) at main.c:231
即使是--mode=immediate模式,也无法停止。原因是有个standby复制槽被一个进程walsender占用着,可以直接杀掉lightdb进程重启。然后重启lightdb即可。如果standby端不是重试模式,就可以了。如果是重试模式,需要把standby先停止。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!