summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorMichael Paquier2022-04-28 04:08:16 +0000
committerMichael Paquier2022-04-28 04:08:16 +0000
commit55b56865115eccd6449e79d6f06fe49d6ba3b792 (patch)
tree06e87b08b6c6a27e472448c7edd1407b8f7e707d /src/include
parente84f82ab5cff2811745ae8e2ac163a4b8b733394 (diff)
Revert recent changes with durable_rename_excl()
This reverts commits 2c902bb and ccfbd92. 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
Diffstat (limited to 'src/include')
-rw-r--r--src/include/pg_config_manual.h7
-rw-r--r--src/include/storage/fd.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h
index 830804fdfbf..84ce5a4a5d7 100644
--- a/src/include/pg_config_manual.h
+++ b/src/include/pg_config_manual.h
@@ -164,6 +164,13 @@
#endif
/*
+ * Define this if your operating system supports link()
+ */
+#if !defined(WIN32) && !defined(__CYGWIN__)
+#define HAVE_WORKING_LINK 1
+#endif
+
+/*
* USE_POSIX_FADVISE controls whether Postgres will attempt to use the
* posix_fadvise() kernel call. Usually the automatic configure tests are
* sufficient, but some older Linux distributions had broken versions of
diff --git a/src/include/storage/fd.h b/src/include/storage/fd.h
index 2b4a8e0ffe8..69549b000fa 100644
--- a/src/include/storage/fd.h
+++ b/src/include/storage/fd.h
@@ -187,6 +187,7 @@ extern void fsync_fname(const char *fname, bool isdir);
extern int fsync_fname_ext(const char *fname, bool isdir, bool ignore_perm, int elevel);
extern int durable_rename(const char *oldfile, const char *newfile, int loglevel);
extern int durable_unlink(const char *fname, int loglevel);
+extern int durable_rename_excl(const char *oldfile, const char *newfile, int loglevel);
extern void SyncDataDirectory(void);
extern int data_sync_elevel(int elevel);