Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite498347

Browse files
committed
Initial commit
1 parent90992e0 commite498347

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎src/bin/pg_rewind/copy_fetch.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ recurse_dir(const char *datadir, const char *parentpath,
158158
* If 'trunc' is true, any existing file with the same name is truncated.
159159
*/
160160
staticvoid
161-
copy_file_range(constchar*path,off_tbegin,off_tend,booltrunc)
161+
rewind_copy_file_range(constchar*path,off_tbegin,off_tend,booltrunc)
162162
{
163163
charbuf[BLCKSZ];
164164
charsrcpath[MAXPGPATH];
@@ -224,15 +224,16 @@ copy_executeFileMap(filemap_t *map)
224224
break;
225225

226226
caseFILE_ACTION_COPY:
227-
copy_file_range(entry->path,0,entry->newsize, true);
227+
rewind_copy_file_range(entry->path,0,entry->newsize, true);
228228
break;
229229

230230
caseFILE_ACTION_TRUNCATE:
231231
truncate_target_file(entry->path,entry->newsize);
232232
break;
233233

234234
caseFILE_ACTION_COPY_TAIL:
235-
copy_file_range(entry->path,entry->oldsize,entry->newsize, false);
235+
rewind_copy_file_range(entry->path,entry->oldsize,
236+
entry->newsize, false);
236237
break;
237238

238239
caseFILE_ACTION_CREATE:
@@ -259,7 +260,7 @@ execute_pagemap(datapagemap_t *pagemap, const char *path)
259260
while (datapagemap_next(iter,&blkno))
260261
{
261262
offset=blkno*BLCKSZ;
262-
copy_file_range(path,offset,offset+BLCKSZ, false);
263+
rewind_copy_file_range(path,offset,offset+BLCKSZ, false);
263264
/* Ok, this block has now been copied from new data dir to old */
264265
}
265266
pg_free(iter);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp