Hi - something weird happened on my production server - I had a symbolic link to c:\rei3 in my onedrive folder so I would have a neat and up to date copy of everything to restore quickly but the permissions were changed on the symbolic link and it removed the files from the local filesystem. This caused postgres to panic & shutdown but when I copied everything back into c:\rei3 it seems to have caused some corruption somewhere :O and upshot is that I now need to restore from the last backup ... the trouble is that it's the installed version (on a windows base) and I don't know what the correct commands are in that configuration so that it restores everything to the correct folder (assuming c:\rei3\database). I ran postgres.exe in the command line and got this:
C:\Program Files\REI3\pgsql16\bin>postgres -D c:\rei3\database\
2025-11-01 21:39:37.176 CET [10640] LOG: starting PostgreSQL 16.1, compiled by Visual C++ build 1937, 64-bit
2025-11-01 21:39:37.180 CET [10640] LOG: listening on IPv6 address "::1", port 5432
2025-11-01 21:39:37.180 CET [10640] LOG: listening on IPv4 address "127.0.0.1", port 5432
2025-11-01 21:39:37.235 CET [5264] LOG: database system was interrupted while in recovery at 2025-11-01 21:39:13 CET
2025-11-01 21:39:37.235 CET [5264] HINT: This probably means that some data is corrupted and you will have to use the last backup for recovery.
2025-11-01 21:39:38.740 CET [5264] LOG: database system was not properly shut down; automatic recovery in progress
2025-11-01 21:39:38.754 CET [5264] LOG: redo starts at 1A8/AA7C8BD8
2025-11-01 21:39:38.757 CET [5264] PANIC: invalid lp
2025-11-01 21:39:38.757 CET [5264] CONTEXT: WAL redo at 1A8/AA7C8E20 for Heap/LOCK: xmax: 255730, off: 33, infobits: [IS_MULTI, EXCL_LOCK], flags: 0x00; blkref #0: rel 1663/16388/17513, blk 0
2025-11-01 21:39:40.372 CET [10640] LOG: startup process (PID 5264) was terminated by exception 0xC0000409
2025-11-01 21:39:40.372 CET [10640] HINT: See C include file "ntstatus.h" for a description of the hexadecimal value.
2025-11-01 21:39:40.373 CET [10640] LOG: terminating any other active server processes
2025-11-01 21:39:40.388 CET [10640] LOG: shutting down due to startup process failure
2025-11-01 21:39:40.391 CET [10640] LOG: database system is shut down
Can anyone let me know the correct command & options needed to restore from the last backup!
Any help is greatly appreciated ;)