StartTime EndTime Mode Size TLI Status
2023-12-11 13:40:29 2023-12-11 13:40:32 FULL 3104kB 2 OK
2023-12-11 13:39:56 2023-12-11 13:39:58 FULL 3105kB 2 OK
2023-12-11 13:35:15 2023-12-11 13:35:17 FULL 3104kB 1 OK
2023-12-11 13:34:19 2023-12-11 13:34:21 FULL 3106kB 1 OK
[pdbbo_adm@rocky-9 data]$ pg_rman restore --recovery-target-time '2023-12-11 13:40:15'
INFO: the recovery target timeline ID is not given
INFO: use timeline ID of current database cluster as recovery target: 2
INFO: calculating timeline branches to be used to recovery target point
INFO: searching latest full backup which can be used as restore start point
INFO: found the full backup can be used as base in recovery: "2023-12-11 13:39:56"
INFO: copying online WAL files and server log files
INFO: clearing restore destination
INFO: validate: "2023-12-11 13:39:56" backup and archive log files by SIZE
INFO: backup "2023-12-11 13:39:56" is valid
INFO: restoring database files from the full mode backup "2023-12-11 13:39:56"
INFO: searching incremental backup to be restored
INFO: searching backup which contained archived WAL files to be restored
INFO: backup "2023-12-11 13:39:56" is valid
INFO: restoring WAL files from backup "2023-12-11 13:39:56"
INFO: backup "2023-12-11 13:40:29" is valid
INFO: restoring WAL files from backup "2023-12-11 13:40:29"
INFO: restoring online WAL files and server log files
INFO: create pg_rman_recovery.conf for recovery-related parameters.
INFO: remove an 'include' directive added by pg_rman in postgresql.conf if exists
INFO: append an 'include' directive in postgresql.conf for pg_rman_recovery.conf
INFO: generating recovery.signal
INFO: removing standby.signal if exists to restore as primary
INFO: restore complete
HINT: Recovery will start automatically when the PostgreSQL server is started. After the recovery is done, we recommend to remove recovery-related parameters configured by pg_rman.
Everything looks good, but in the logs I receive this:
t 2023-12-11 13:39:56 GMT",,,,,,,,"StartupXLOG, xlog.c:6570","","startup",,0
2023-12-11 13:47:13.632 GMT,,,1605200,,657712e1.187e50,2,,2023-12-11 13:47:13 GMT,,0,LOG,00000,"starting point-in-time recovery to 2023-12-11 13:40:15+00",,,,,,,,"StartupXLOG, xlog.c:6640","","startup",,0
2023-12-11 13:47:13.634 GMT,,,1605200,,657712e1.187e50,3,,2023-12-11 13:47:13 GMT,,0,LOG,00000,"invalid primary checkpoint record",,,,,,,,"ReadCheckpointRecord, xlog.c:8490","","startup",,0
2023-12-11 13:47:13.634 GMT,,,1605200,,657712e1.187e50,4,,2023-12-11 13:47:13 GMT,,0,PANIC,XX000,"could not locate a valid checkpoint record",,,,,,,,"StartupXLOG, xlog.c:6859","","startup",,0
2023-12-11 13:47:13.697 GMT,,,1605198,,657712e1.187e4e,6,,2023-12-11 13:47:13 GMT,,0,LOG,00000,"startup process (PID 1605200) was terminated by signal 6: Aborted",,,,,,,,"LogChildExit, postmaster.c:3751","","postmaster",,0
2023-12-11 13:47:13.697 GMT,,,1605198,,657712e1.187e4e,7,,2023-12-11 13:47:13 GMT,,0,LOG,00000,"aborting startup due to startup process failure",,,,,,,,"reaper, postmaster.c:2991","","postmaster",,0
2023-12-11 13:47:13.712 GMT,,,1605198,,657712e1.187e4e,8,,2023-12-11 13:47:13 GMT,,0,LOG,00000,"database system is shut down",,,,,,,,"UnlinkLockFiles, miscinit.c:962","","postmaster",,0
This is the reason why I cannot start the PG cluster
Hello, When I try to do a PITR:
pg_rman show
StartTime EndTime Mode Size TLI Status 2023-12-11 13:40:29 2023-12-11 13:40:32 FULL 3104kB 2 OK 2023-12-11 13:39:56 2023-12-11 13:39:58 FULL 3105kB 2 OK 2023-12-11 13:35:15 2023-12-11 13:35:17 FULL 3104kB 1 OK 2023-12-11 13:34:19 2023-12-11 13:34:21 FULL 3106kB 1 OK
[pdbbo_adm@rocky-9 data]$ pg_rman restore --recovery-target-time '2023-12-11 13:40:15' INFO: the recovery target timeline ID is not given INFO: use timeline ID of current database cluster as recovery target: 2 INFO: calculating timeline branches to be used to recovery target point INFO: searching latest full backup which can be used as restore start point INFO: found the full backup can be used as base in recovery: "2023-12-11 13:39:56" INFO: copying online WAL files and server log files INFO: clearing restore destination INFO: validate: "2023-12-11 13:39:56" backup and archive log files by SIZE INFO: backup "2023-12-11 13:39:56" is valid INFO: restoring database files from the full mode backup "2023-12-11 13:39:56" INFO: searching incremental backup to be restored INFO: searching backup which contained archived WAL files to be restored INFO: backup "2023-12-11 13:39:56" is valid INFO: restoring WAL files from backup "2023-12-11 13:39:56" INFO: backup "2023-12-11 13:40:29" is valid INFO: restoring WAL files from backup "2023-12-11 13:40:29" INFO: restoring online WAL files and server log files INFO: create pg_rman_recovery.conf for recovery-related parameters. INFO: remove an 'include' directive added by pg_rman in postgresql.conf if exists INFO: append an 'include' directive in postgresql.conf for pg_rman_recovery.conf INFO: generating recovery.signal INFO: removing standby.signal if exists to restore as primary INFO: restore complete HINT: Recovery will start automatically when the PostgreSQL server is started. After the recovery is done, we recommend to remove recovery-related parameters configured by pg_rman.
Everything looks good, but in the logs I receive this:
t 2023-12-11 13:39:56 GMT",,,,,,,,"StartupXLOG, xlog.c:6570","","startup",,0 2023-12-11 13:47:13.632 GMT,,,1605200,,657712e1.187e50,2,,2023-12-11 13:47:13 GMT,,0,LOG,00000,"starting point-in-time recovery to 2023-12-11 13:40:15+00",,,,,,,,"StartupXLOG, xlog.c:6640","","startup",,0 2023-12-11 13:47:13.634 GMT,,,1605200,,657712e1.187e50,3,,2023-12-11 13:47:13 GMT,,0,LOG,00000,"invalid primary checkpoint record",,,,,,,,"ReadCheckpointRecord, xlog.c:8490","","startup",,0 2023-12-11 13:47:13.634 GMT,,,1605200,,657712e1.187e50,4,,2023-12-11 13:47:13 GMT,,0,PANIC,XX000,"could not locate a valid checkpoint record",,,,,,,,"StartupXLOG, xlog.c:6859","","startup",,0 2023-12-11 13:47:13.697 GMT,,,1605198,,657712e1.187e4e,6,,2023-12-11 13:47:13 GMT,,0,LOG,00000,"startup process (PID 1605200) was terminated by signal 6: Aborted",,,,,,,,"LogChildExit, postmaster.c:3751","","postmaster",,0 2023-12-11 13:47:13.697 GMT,,,1605198,,657712e1.187e4e,7,,2023-12-11 13:47:13 GMT,,0,LOG,00000,"aborting startup due to startup process failure",,,,,,,,"reaper, postmaster.c:2991","","postmaster",,0 2023-12-11 13:47:13.712 GMT,,,1605198,,657712e1.187e4e,8,,2023-12-11 13:47:13 GMT,,0,LOG,00000,"database system is shut down",,,,,,,,"UnlinkLockFiles, miscinit.c:962","","postmaster",,0
This is the reason why I cannot start the PG cluster
Could you please advice?