Can I set up Wal Archiving on a three years old Postgres database

backuppostgresqlreplicationtransaction-log

If I set up Wal Archiving on a three years old Postgres database (used in production); do the Continuous Archiving and Point-in-Time Recovery (PITR) will work from the beginning? Will I have all the data? Or some logs will miss and thus, some data?

For example: So if I enabled wal archiving 3 days ago, and I want to restore to yesterday. Will I have all the data from the beginning? Or only the data from 3 days ago to yesterday?

Best Answer

You need to perform a base backup regularly, since you need to restore the backup before you can recover using WAL.