postgresqlpitr

Why timeline did not changed after recovery simple postgresql 15.5(linux ubuntu)?


I set foollowing settings:

 wal_level = logical
archive_mode = on       # enables archiving; off, on, or always
archive_command = 'test ! -f /home/15arc/%f && cp %p /home/15arc/%f'        # command to use to archive a logfile segment

Performed backup:

./pg_basebackup -D /home/backup  -Ft -p 5415 -P -U postgres

After I deleted all data from where postgres cluster was installed (/home/postgres15)

Then I unzip 2 backup files into /home/postgres15 And start db:

 ./pg_ctl -D /home/postgres15  start

And the history timeline file was not created.. Do you know why?


Solution

  • Because you forgot to create the file recovery.signal. PostgreSQL performed normal crash recovery, starting with the checkpoint from backup_label and using WAL from pg_wal.