日志:
2024-01-22 17:02:23.522: main pid 3956: LOG: reaper handler
2024-01-22 17:02:23.523: main pid 3956: LOG: reaper handler: exiting normally
2024-01-22 17:02:35.423: [unknown] pid 11091: WARNING: write on backend 0 failed with error :"Broken pipe"
2024-01-22 17:02:35.423: [unknown] pid 11091: DETAIL: while trying to write data from offset: 0 wlen: 265642
2024-01-22 17:02:35.423: [unknown] pid 11091: ERROR: unable to write data to backend
2024-01-22 17:02:35.423: [unknown] pid 11091: DETAIL: pool_flush failed
2024-01-22 17:02:35.426: [unknown] pid 11091: WARNING: write on backend 0 failed with error :"Broken pipe"
2024-01-22 17:02:35.426: [unknown] pid 11091: DETAIL: while trying to write data from offset: 0 wlen: 18
2024-01-22 17:02:35.435: [unknown] pid 11091: LOG: received degenerate backend request for node_id: 0 from pid [11091]
2024-01-22 17:02:35.438: watchdog pid 3958: LOG: watchdog received the failover command from local pgpool-II on IPC interface
2024-01-22 17:02:35.438: watchdog pid 3958: LOG: watchdog is processing the failover command [DEGENERATE_BACKEND_REQUEST] received from local pgpool-II on IPC interface
2024-01-22 17:02:35.438: watchdog pid 3958: LOG: we have got the consensus to perform the failover
2024-01-22 17:02:35.438: watchdog pid 3958: DETAIL: 1 node(s) voted in the favor
2024-01-22 17:02:35.438: [unknown] pid 11091: LOG: signal_user1_to_parent_with_reason(0)
2024-01-22 17:02:35.438: [unknown] pid 11091: LOG: unable to flush data to backend
2024-01-22 17:02:35.438: [unknown] pid 11091: DETAIL: do not failover because I am the main process
2024-01-22 17:02:35.438: [unknown] pid 11091: WARNING: write on backend 0 failed with error :"Broken pipe"
2024-01-22 17:02:35.438: [unknown] pid 11091: DETAIL: while trying to write data from offset: 0 wlen: 5
2024-01-22 17:02:35.438: main pid 3956: LOG: Pgpool-II parent process received SIGUSR1
2024-01-22 17:02:35.439: main pid 3956: LOG: Pgpool-II parent process has received failover request
2024-01-22 17:02:35.439: watchdog pid 3958: LOG: received the failover indication from Pgpool-II on IPC interface
2024-01-22 17:02:35.439: watchdog pid 3958: LOG: watchdog is informed of failover start by the main process
问题:
(1)11091显示的是unknown,是不是这个进程本身出现了啥问题,导致pgpool和主库通信异常,所以触发pgpool对pg进行主备切换?11091的问题能查到嘛?
(2)DETAIL: do not failover because I am the main process 根据日志看,主进程不是3956嘛,还是说11091出问题了,导致他认为自己是主进程?
PS:整个过程中后段PG主备均正常。