请教一个数据库莫名重启的问题
mawenbin666 opened this issue · 1 comments
mawenbin666 commented
- 环境介绍:
postgresql 12.3, centos 7.8
- 日志报错如下:
2021-05-06 00:00:02 CST [363079]: [30292-1] user=,db=,client= LOG: checkpoint complete: wrote 79 buffers (0.0%); 0 WAL file(s) added, 0 removed, 37 recycled; write=3.836 s, sync=0.002 s, total=4.046 s; sync files=54, longest=0.000 s, average=0.000 s; distance=636076 kB, estimate=636076 kB
2021-05-06 00:00:04 CST [363079]: [30293-1] user=,db=,client= LOG: checkpoints are occurring too frequently (6 seconds apart)
2021-05-06 00:00:04 CST [363079]: [30294-1] user=,db=,client= HINT: Consider increasing the configuration parameter "max_wal_size".
2021-05-06 00:00:04 CST [363079]: [30295-1] user=,db=,client= LOG: checkpoint starting: wal
2021-05-06 00:00:04 CST [79873]: [2-1] user=bm,db=dw,client=192.168.63.1 LOG: could not receive data from client: Connection reset by peer
2021-05-06 00:00:04 CST [79873]: [3-1] user=bm,db=dw,client=192.168.63.1 LOG: unexpected EOF on client connection with an open transaction
2021-05-06 00:00:04 CST [363049]: [12-1] user=,db=,client= LOG: server process (PID 79873) was terminated by signal 11: Segmentation fault
2021-05-06 00:00:04 CST [363049]: [13-1] user=,db=,client= DETAIL: Failed process was running: select t1.data_id,t1.store_code,t1.user_code,t1.prd_code,t1.prd_qty::varchar(100),t1.group_qty::varchar(100),t1.changed_timestamp,t1.etl_datetime::varchar(100),t1.number_remark,t1.data_date from bm.fact_ka_sales_actu_dsup_sum t1
2021-05-06 00:00:04 CST [363049]: [14-1] user=,db=,client= LOG: terminating any other active server processes
2021-05-06 00:00:04 CST [94609]: [1-1] user=bm,db=dw,client=192.168.63.1 WARNING: terminating connection because of crash of another server process
2021-05-06 00:00:04 CST [94609]: [2-1] user=bm,db=dw,client=192.168.63.1 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.
2021-05-06 00:00:04 CST [94609]: [3-1] user=bm,db=dw,client=192.168.63.1 HINT: In a moment you should be able to reconnect to the database and repeat your command.
2021-05-06 00:00:04 CST [94609]: [4-1] user=bm,db=dw,client=192.168.63.1 CONTEXT: SQL statement "select count(*) from (select *
from (select t1.param_name, t1.param_value
from data_back.t_bak_text t1
where t1.id = $1
and t1.v_version = (current_vesion - 1)::varchar
Except
select t2.param_name, t2.param_value
from data_back.TMP_BAK_TEXT_PG_DW_bm t2
) tt
union ALL
select *
from (select t2.param_name, t2.param_value
from data_back.TMP_BAK_TEXT_PG_DW_bm t2
Except
select t1.param_name, t1.param_value
from data_back.t_bak_text t1
where t1.id = $1
and t1.v_version = (current_vesion - 1)::varchar
) tt) ttt"
PL/pgSQL function data_back.f_load_pgdw_text(character varying) line 10 at SQL statement
2021-05-06 00:00:04 CST [94604]: [1-1] user=bm,db=dw,client=192.168.63.1 WARNING: terminating connection because of crash of another server process
2021-05-06 00:00:04 CST [94604]: [2-1] user=bm,db=dw,client=192.168.63.1 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.
2021-05-06 00:00:04 CST [94604]: [3-1] user=bm,db=dw,client=192.168.63.1 HINT: In a moment you should be able to reconnect to the database and repeat your command.
2021-05-06 00:00:04 CST [94604]: [4-1] user=bm,db=dw,client=192.168.63.1 CONTEXT: SQL statement "update data_back.t_bak_main set v_stat = 'S',v_version = (current_vesion - 1),
last_update_reson = (select t.last_update_reson from data_back.t_bak_main_old t where t.id = $1 and t.v_version = (current_vesion - 1)),
last_update_user = (select t.last_update_user from data_back.t_bak_main_old t where t.id = $1 and t.v_version = (current_vesion - 1)),
last_update_time = (select t.last_update_time from data_back.t_bak_main_old t where t.id = $1 and t.v_version = (current_vesion - 1))
where id = $1"
PL/pgSQL function data_back.f_load_etl_text(character varying) line 45 at SQL statement
2021-05-06 00:00:04 CST [94595]: [1-1] user=mgnt_manager,db=mgntetl,client=192.168.63.1 WARNING: terminating connection because of crash of another server process
2021-05-06 00:00:04 CST [94595]: [2-1] user=mgnt_manager,db=mgntetl,client=192.168.63.1 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.
2021-05-06 00:00:04 CST [94595]: [3-1] user=mgnt_manager,db=mgntetl,client=192.168.63.1 HINT: In a moment you should be able to reconnect to the database and repeat your command.
2021-05-06 00:00:04 CST [92680]: [1-1] user=bm,db=dw,client=192.168.63.29 WARNING: terminating connection because of crash of another server process
2021-05-06 00:00:04 CST [92680]: [2-1] user=bm,db=dw,client=192.168.63.29 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.
2021-05-06 00:00:04 CST [335516]: [7-1] user=mgnt_manager,db=mgntetl,client=192.168.63.26 HINT: In a moment you should be able to reconnect to the database and repeat your command.
2021-05-06 00:00:04 CST [379543]: [10-1] user=mgnt_manager,db=mgntetl,client=192.168.63.29 WARNING: terminating connection because of crash of another server process
2021-05-06 00:00:04 CST [379543]: [11-1] user=mgnt_manager,db=mgntetl,client=192.168.63.29 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.
2021-05-06 00:00:04 CST [379543]: [12-1] user=mgnt_manager,db=mgntetl,client=192.168.63.29 HINT: In a moment you should be able to reconnect to the database and repeat your command.
2021-05-06 00:00:04 CST [363082]: [1-1] user=,db=,client= WARNING: terminating connection because of crash of another server process
2021-05-06 00:00:04 CST [363082]: [2-1] user=,db=,client= 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.
2021-05-06 00:00:04 CST [363082]: [3-1] user=,db=,client= HINT: In a moment you should be able to reconnect to the database and repeat your command.
2021-05-06 00:00:04 CST [233564]: [2-1] user=mgnt_manager,db=mgntetl,client=192.168.63.25 WARNING: terminating connection because of crash of another server process
2021-05-06 00:00:04 CST [233564]: [3-1] user=mgnt_manager,db=mgntetl,client=192.168.63.25 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.
2021-05-06 00:00:04 CST [233564]: [4-1] user=mgnt_manager,db=mgntetl,client=192.168.63.25 HINT: In a moment you should be able to reconnect to the database and repeat your command.
2021-05-06 00:00:04 CST [164317]: [1-1] user=mgnt_manager,db=mgntetl,client=192.168.63.43 WARNING: terminating connection because of crash of another server process
2021-05-06 00:00:04 CST [164317]: [2-1] user=mgnt_manager,db=mgntetl,client=192.168.63.43 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.
2021-05-06 00:00:04 CST [164317]: [3-1] user=mgnt_manager,db=mgntetl,client=192.168.63.43 HINT: In a moment you should be able to reconnect to the database and repeat your command.
2021-05-06 00:00:04 CST [94614]: [1-1] user=monitor,db=postgres,client=127.0.0.1 FATAL: the database system is in recovery mode
2021-05-06 00:00:04 CST [94615]: [1-1] user=monitor,db=postgres,client=127.0.0.1 FATAL: the database system is in recovery mode
2021-05-06 00:00:04 CST [94616]: [1-1] user=mgnt_manager,db=mgntetl,client=192.168.63.1 FATAL: the database system is in recovery mode
2021-05-06 00:00:04 CST [94617]: [1-1] user=monitor,db=postgres,client=127.0.0.1 FATAL: the database system is in recovery mode
2021-05-06 00:00:04 CST [94618]: [1-1] user=monitor,db=postgres,client=127.0.0.1 FATAL: the database system is in recovery mode
2021-05-06 00:00:04 CST [94619]: [1-1] user=monitor,db=postgres,client=127.0.0.1 FATAL: the database system is in recovery mode
2021-05-06 00:00:04 CST [363088]: [1-1] user=replica,db=[unknown],client=192.168.39.20 WARNING: terminating connection because of crash of another server process
2021-05-06 00:00:04 CST [363088]: [2-1] user=replica,db=[unknown],client=192.168.39.20 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.
2021-05-06 00:00:04 CST [363088]: [3-1] user=replica,db=[unknown],client=192.168.39.20 HINT: In a moment you should be able to reconnect to the database and repeat your command.
2021-05-06 00:00:04 CST [363087]: [1-1] user=replica,db=[unknown],client=192.168.39.19 WARNING: terminating connection because of crash of another server process
2021-05-06 00:00:04 CST [363087]: [2-1] user=replica,db=[unknown],client=192.168.39.19 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.
2021-05-06 00:00:04 CST [363087]: [3-1] user=replica,db=[unknown],client=192.168.39.19 HINT: In a moment you should be able to reconnect to the database and repeat your command.
2021-05-06 00:00:04 CST [94620]: [1-1] user=monitor,db=postgres,client=127.0.0.1 FATAL: the database system is in recovery mode
2021-05-06 00:00:04 CST [94621]: [1-1] user=monitor,db=postgres,client=127.0.0.1 FATAL: the database system is in recovery mode
2021-05-06 00:00:04 CST [94622]: [1-1] user=monitor,db=postgres,client=127.0.0.1 FATAL: the database system is in recovery mode
2021-05-06 00:00:04 CST [94596]: [1-1] user=bm,db=dw,client=192.168.63.1 WARNING: terminating connection because of crash of another server process
2021-05-06 00:00:04 CST [94596]: [2-1] user=bm,db=dw,client=192.168.63.1 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.
2021-05-06 00:00:04 CST [94596]: [3-1] user=bm,db=dw,client=192.168.63.1 HINT: In a moment you should be able to reconnect to the database and repeat your command.
2021-05-06 00:00:04 CST [94623]: [1-1] user=mgnt_manager,db=mgntetl,client=192.168.63.1 FATAL: the database system is in recovery mode
2021-05-06 00:00:05 CST [94624]: [1-1] user=replica,db=[unknown],client=192.168.39.19 FATAL: the database system is in recovery mode
2021-05-06 00:00:05 CST [94546]: [1-1] user=bm,db=dw,client=192.168.63.1 WARNING: terminating connection because of crash of another server process
2021-05-06 00:00:05 CST [94546]: [2-1] user=bm,db=dw,client=192.168.63.1 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.
2021-05-06 00:00:05 CST [94546]: [3-1] user=bm,db=dw,client=192.168.63.1 HINT: In a moment you should be able to reconnect to the database and repeat your command.
2021-05-06 00:00:05 CST [94625]: [1-1] user=mgnt_manager,db=mgntetl,client=192.168.63.1 FATAL: the database system is in recovery mode
2021-05-06 00:00:05 CST [94627]: [1-1] user=mgnt_manager,db=mgntetl,client=192.168.63.43 FATAL: the database system is in recovery mode
2021-05-06 00:00:05 CST [94628]: [1-1] user=mgnt_manager,db=mgntetl,client=192.168.63.43 FATAL: the database system is in recovery mode
2021-05-06 00:00:05 CST [94629]: [1-1] user=replica,db=[unknown],client=192.168.39.20 FATAL: the database system is in recovery mode
2021-05-06 00:00:05 CST [94630]: [1-1] user=mgnt_manager,db=mgntetl,client=192.168.63.43 FATAL: the database system is in recovery mode
2021-05-06 00:00:05 CST [94631]: [1-1] user=monitor,db=postgres,client=127.0.0.1 FATAL: the database system is in recovery mode
2021-05-06 00:00:05 CST [94632]: [1-1] user=monitor,db=postgres,client=127.0.0.1 FATAL: the database system is in recovery mode
2021-05-06 00:00:05 CST [94633]: [1-1] user=monitor,db=postgres,client=127.0.0.1 FATAL: the database system is in recovery mode
2021-05-06 00:00:05 CST [94634]: [1-1] user=monitor,db=postgres,client=127.0.0.1 FATAL: the database system is in recovery mode
2021-05-06 00:00:06 CST [94635]: [1-1] user=bm,db=dw,client=192.168.63.25 FATAL: the database system is in recovery mode
2021-05-06 00:00:07 CST [94637]: [1-1] user=bm,db=dw,client=192.168.63.25 FATAL: the database system is in recovery mode
2021-05-06 00:00:08 CST [363049]: [15-1] user=,db=,client= LOG: all server processes terminated; reinitializing
2021-05-06 00:00:20 CST [94650]: [1-1] user=replica,db=[unknown],client=192.168.39.19 FATAL: the database system is in recovery mode
2021-05-06 00:00:20 CST [94654]: [1-1] user=mgnt_manager,db=mgntetl,client=192.168.63.1 FATAL: the database system is in recovery mode
2021-05-06 00:00:20 CST [94652]: [1-1] user=monitor,db=postgres,client=127.0.0.1 FATAL: the database system is in recovery mode
2021-05-06 00:00:20 CST [94651]: [1-1] user=replica,db=[unknown],client=192.168.39.20 FATAL: the database system is in recovery mode
2021-05-06 00:00:20 CST [94649]: [1-1] user=bm,db=dw,client=192.168.63.25 FATAL: the database system is in recovery mode
2021-05-06 00:00:20 CST [94648]: [1-1] user=,db=,client= LOG: database system was interrupted; last known up at 2021-05-06 00:00:02 CST
2021-05-06 00:00:20 CST [94653]: [1-1] user=mgnt_manager,db=mgntetl,client=192.168.63.43 FATAL: the database system is in recovery mode
2021-05-06 00:00:20 CST [94655]: [1-1] user=monitor,db=postgres,client=127.0.0.1 FATAL: the database system is in recovery mode
2021-05-06 00:00:20 CST [94656]: [1-1] user=replica,db=[unknown],client=192.168.39.19 FATAL: the database system is in recovery mode
2021-05-06 00:00:20 CST [94657]: [1-1] user=replica,db=[unknown],client=192.168.39.20 FATAL: the database system is in recovery mode
2021-05-06 00:00:20 CST [94658]: [1-1] user=mgnt_manager,db=mgntetl,client=192.168.63.1 FATAL: the database system is in recovery mode
2021-05-06 00:00:20 CST [94659]: [1-1] user=monitor,db=postgres,client=127.0.0.1 FATAL: the database system is in recovery mode
2021-05-06 00:00:20 CST [94660]: [1-1] user=monitor,db=postgres,client=127.0.0.1 FATAL: the database system is in recovery mode
2021-05-06 00:00:20 CST [94661]: [1-1] user=monitor,db=postgres,client=127.0.0.1 FATAL: the database system is in recovery mode
2021-05-06 00:00:20 CST [94716]: [1-1] user=monitor,db=postgres,client=127.0.0.1 FATAL: the database system is in recovery mode
2021-05-06 00:00:20 CST [94717]: [1-1] user=mgnt_manager,db=mgntetl,client=192.168.63.43 FATAL: the database system is in recovery mode
2021-05-06 00:00:20 CST [94718]: [1-1] user=mgnt_manager,db=mgntetl,client=192.168.63.43 FATAL: the database system is in recovery mode
2021-05-06 00:00:20 CST [94719]: [1-1] user=mgnt_manager,db=mgntetl,client=192.168.63.43 FATAL: the database system is in recovery mode
2021-05-06 00:00:20 CST [94743]: [1-1] user=mgnt_manager,db=mgntetl,client=192.168.63.43 FATAL: the database system is in recovery mode
2021-05-06 00:00:21 CST [94648]: [2-1] user=,db=,client= LOG: database system was not properly shut down; automatic recovery in progress
2021-05-06 00:00:21 CST [94648]: [3-1] user=,db=,client= LOG: redo starts at 1C590/B85B9F50
2021-05-06 00:00:21 CST [94744]: [1-1] user=bm,db=dw,client=192.168.63.25 FATAL: the database system is in recovery mode
2021-05-06 00:00:22 CST [94746]: [1-1] user=bm,db=dw,client=192.168.63.25 FATAL: the database system is in recovery mode
2021-05-06 00:00:22 CST [94747]: [1-1] user=monitor,db=postgres,client=127.0.0.1 FATAL: the database system is in recovery mode
2021-05-06 00:00:23 CST [94749]: [1-1] user=bm,db=dw,client=192.168.63.25 FATAL: the database system is in recovery mode
2021-05-06 00:00:23 CST [94750]: [1-1] user=monitor,db=postgres,client=127.0.0.1 FATAL: the database system is in recovery mode
2021-05-06 00:00:24 CST [94648]: [4-1] user=,db=,client= LOG: invalid record length at 1C590/DFD585E8: wanted 24, got 0
2021-05-06 00:00:24 CST [94648]: [5-1] user=,db=,client= LOG: redo done at 1C590/DFD585C0
2021-05-06 00:00:24 CST [94648]: [6-1] user=,db=,client= LOG: checkpoint starting: end-of-recovery immediate
2021-05-06 00:00:24 CST [94752]: [1-1] user=bm,db=dw,client=192.168.63.25 FATAL: the database system is in recovery mode
2021-05-06 00:00:24 CST [94648]: [7-1] user=,db=,client= LOG: checkpoint complete: wrote 81295 buffers (0.8%); 0 WAL file(s) added, 0 removed, 15 recycled; write=0.645 s, sync=0.000 s, total=0.668 s; sync files=62, longest=0.000 s, average=0.000 s; distance=646777 kB, estimate=646777 kB
2021-05-06 00:00:24 CST [363049]: [16-1] user=,db=,client= LOG: database system is ready to accept connections
2021-05-06 00:30:24 CST [94753]: [1-1] user=,db=,client= LOG: checkpoint starting: time
2021-05-06 00:32:06 CST [94753]: [2-1] user=,db=,client= LOG: checkpoint complete: wrote 1006 buffers (0.0%); 0 WAL file(s) added, 1 removed, 0 recycled; write=101.411 s, sync=0.000 s, total=101.432 s; sync files=34, longest=0.000 s, average=0.000 s; distance=3302 kB, estimate=3302 kB
- 这是什么原因导致的呢?