aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_rewind/copy_fetch.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/bin/pg_rewind/copy_fetch.c b/src/bin/pg_rewind/copy_fetch.c
index 168d040881c..964c5410600 100644
--- a/src/bin/pg_rewind/copy_fetch.c
+++ b/src/bin/pg_rewind/copy_fetch.c
@@ -158,7 +158,7 @@ recurse_dir(const char *datadir, const char *parentpath,
* If 'trunc' is true, any existing file with the same name is truncated.
*/
static void
-copy_file_range(const char *path, off_t begin, off_t end, bool trunc)
+rewind_copy_file_range(const char *path, off_t begin, off_t end, bool trunc)
{
char buf[BLCKSZ];
char srcpath[MAXPGPATH];
@@ -224,7 +224,7 @@ copy_executeFileMap(filemap_t *map)
break;
case FILE_ACTION_COPY:
- copy_file_range(entry->path, 0, entry->newsize, true);
+ rewind_copy_file_range(entry->path, 0, entry->newsize, true);
break;
case FILE_ACTION_TRUNCATE:
@@ -232,7 +232,8 @@ copy_executeFileMap(filemap_t *map)
break;
case FILE_ACTION_COPY_TAIL:
- copy_file_range(entry->path, entry->oldsize, entry->newsize, false);
+ rewind_copy_file_range(entry->path, entry->oldsize,
+ entry->newsize, false);
break;
case FILE_ACTION_CREATE:
@@ -259,7 +260,7 @@ execute_pagemap(datapagemap_t *pagemap, const char *path)
while (datapagemap_next(iter, &blkno))
{
offset = blkno * BLCKSZ;
- copy_file_range(path, offset, offset + BLCKSZ, false);
+ rewind_copy_file_range(path, offset, offset + BLCKSZ, false);
/* Ok, this block has now been copied from new data dir to old */
}
pg_free(iter);