Hi, Am Mittwoch, den 07.10.2020, 18:17 +1300 schrieb Thomas Munro: > ... and for comparison/discussion, here is an alternative patch that > figures out precisely which files need to be fsync'd using information > in the WAL.
One question about this: Did you consider the case of a basebackup being copied/restored somewhere and the restore/PITR being started? Shouldn't Postgres then sync the whole data directory first in order to assure durability, or do we consider this to be on the tool that does the copying? Or is this not needed somehow? My understanding is that Postgres would go through the same code path during PITR: if (ControlFile->state != DB_SHUTDOWNED && ControlFile->state != DB_SHUTDOWNED_IN_RECOVERY) { RemoveTempXlogFiles(); SyncDataDirectory(); If I didn't miss anything, that would be a point for the syncfs patch? Michael -- Michael Banck Projektleiter / Senior Berater Tel.: +49 2166 9901-171 Fax: +49 2166 9901-100 Email: michael.ba...@credativ.de credativ GmbH, HRB Mönchengladbach 12080 USt-ID-Nummer: DE204566209 Trompeterallee 108, 41189 Mönchengladbach Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer Unser Umgang mit personenbezogenen Daten unterliegt folgenden Bestimmungen: https://www.credativ.de/datenschutz