Why clear pg_wal when recovering? - Mailing list pgsql-novice

From Mikael Sterner
Subject Why clear pg_wal when recovering?
Date
Msg-id 34654dce-25fe-4d12-bf6e-b8b28a54b164@www.fastmail.com
Whole thread Raw
List pgsql-novice
Hi!

In the guide at https://www.postgresql.org/docs/current/continuous-archiving.html#BACKUP-PITR-RECOVERY
step 5 is to remove any files present in the pg_wal directory. Is this
still the recommendation if the source of the file system restore in step 4
was a base backup generated by pg_basebackup? Because in that case, wouldn't
the files in pg_wal still be needed to recover from the basebackup state?

I guess these files that were removed would normally be restored from the
WAL archive, but if you have for some reason lost your WAL archive, or it's
not complete, wouldn't it be better if you had retained them in the restored
data directory so that you could at least reach the state at the end of your
latest base backup?

Yours,
Mikael



pgsql-novice by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Phonetic representation LENGHT for DMETAPHONE, is there a way to make it longer?
Next
From: Cabe Steele
Date:
Subject: Regclass what does reg mean