mirror of
https://github.com/postgres/postgres.git
synced 2025-06-14 18:42:34 +03:00
Revert recent changes with durable_rename_excl()
This reverts commits2c902bb
andccfbd92
. Per buildfarm members kestrel, rorqual and calliphoridae, the assertions checking that a TLI history file should not exist when created by a WAL receiver have been failing, and switching to durable_rename() over durable_rename_excl() would cause the newest TLI history file to overwrite the existing one. We need to think harder about such cases, so revert the new logic for now. Note that all the failures have been reported in the test 025_stuck_on_old_timeline. Discussion: https://postgr.es/m/511362.1651116498@sss.pgh.pa.us
This commit is contained in:
@ -281,10 +281,9 @@ basic_archive_file_internal(const char *file, const char *path)
|
||||
|
||||
/*
|
||||
* Sync the temporary file to disk and move it to its final destination.
|
||||
* Note that this will overwrite any existing file, but this is only
|
||||
* possible if someone else created the file since the stat() above.
|
||||
* This will fail if destination already exists.
|
||||
*/
|
||||
(void) durable_rename(temp, destination, ERROR);
|
||||
(void) durable_rename_excl(temp, destination, ERROR);
|
||||
|
||||
ereport(DEBUG1,
|
||||
(errmsg("archived \"%s\" via basic_archive", file)));
|
||||
|
Reference in New Issue
Block a user