restore_command = 'cp /tmp/wal_backup/%f %p'
recovery_target_time = '2022-02-11 05:00:00'
2022-02-11 05:07:39.809 UTC [1111] LOG: starting PostgreSQL 13.5 (Ubuntu 13.5-2.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit
2022-02-11 05:07:39.809 UTC [1111] LOG: listening on IPv4 address "127.0.0.1", port 5432
2022-02-11 05:07:39.812 UTC [1111] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-02-11 05:07:39.820 UTC [1112] LOG: database system was interrupted while in recovery at log time 2022-02-10 23:02:09 UTC
2022-02-11 05:07:39.820 UTC [1112] HINT: If this has occurred more than once some data might be corrupted and you might need to choose an earlier recovery target.
cp: cannot stat '/tmp/wal_backup/00000002.history': No such file or directory
2022-02-11 05:07:39.928 UTC [1112] LOG: starting point-in-time recovery to 2022-02-11 02:00:00+00
2022-02-11 05:07:39.947 UTC [1112] LOG: restored log file "0000000100000011000000C8" from archive
2022-02-11 05:07:40.143 UTC [1112] LOG: redo starts at 11/C893A778
2022-02-11 05:07:40.192 UTC [1112] LOG: restored log file "0000000100000011000000C9" from archive
2022-02-11 05:07:40.358 UTC [1112] LOG: consistent recovery state reached at 11/C9663E88
2022-02-11 05:07:40.358 UTC [1112] LOG: invalid resource manager ID 102 at 11/C9663E88
2022-02-11 05:07:40.358 UTC [1112] LOG: redo done at 11/C9663E50
2022-02-11 05:07:40.358 UTC [1112] LOG: last completed transaction was at log time 2022-02-10 23:11:54.055611+00
2022-02-11 05:07:40.358 UTC [1112] FATAL: recovery ended before configured recovery target was reached
2022-02-11 05:07:40.361 UTC [1111] LOG: startup process (PID 1112) exited with exit code 1
2022-02-11 05:07:40.361 UTC [1111] LOG: terminating any other active server processes
2022-02-11 05:07:40.364 UTC [1111] LOG: database system is shut down
Спасиб. По итогу да, виновата была дырка в логах, хоть и до нужного журнала с этой датой были все необходимые, но база видимо пыталась прокрутить весь журнал, чтоб при необходимости продолжить дальше восстановление, и по итогу падало.
В прошлые разы, когда пытался запустить, видимо где-то 1-2 журнала были недописанные и из-за этого падало.