Comment by SigmundA
16 hours ago
>If you lose the WAL you lose the data since the last merge but there’s no risk of corruption.
That is not my understanding:
https://www.postgresql.org/docs/current/app-pgresetwal.html
>After running this command on a data directory with corrupted WAL or a corrupted control file, it should be possible to start the server, but bear in mind that the database might contain inconsistent data due to partially-committed transactions. You should immediately dump your data, run initdb, and restore. After restore, check for inconsistencies and repair as needed.
I guess that depends on the definition of corrupted. It just describes what to do when the WAL is corrupt, but doesn’t say what conditions are considered corrupt. (We use ZFS so I haven’t run into torn writes.)