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

Commit3033e73

Browse files
committed
Fix missing abort checks in pg_backup_directory.c.
Parallel restore from directory format failed to respond to control-Cin a timely manner, because there were no checkAborting() calls in thecode path that reads data from a file and sends it to the backend.If any worker was in the midst of restoring data for a large table,you'd just have to wait.This fix doesn't do anything for the problem of aborting a long-runningserver-side command, but at least it fixes things for data transfers.Back-patch to 9.3 where parallel restore was introduced.
1 parent99e3298 commit3033e73

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎src/bin/pg_dump/pg_backup_directory.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,12 @@ _PrintFileData(ArchiveHandle *AH, char *filename, RestoreOptions *ropt)
411411
buflen=ZLIB_OUT_SIZE;
412412

413413
while ((cnt=cfread(buf,buflen,cfp)))
414+
{
415+
/* Are we aborting? */
416+
checkAborting(AH);
417+
414418
ahwrite(buf,1,cnt,AH);
419+
}
415420

416421
free(buf);
417422
if (cfclose(cfp)!=0)
@@ -556,6 +561,9 @@ _ReadBuf(ArchiveHandle *AH, void *buf, size_t len)
556561
lclContext*ctx= (lclContext*)AH->formatData;
557562
size_tres;
558563

564+
/* Are we aborting? */
565+
checkAborting(AH);
566+
559567
res=cfread(buf,len,ctx->dataFH);
560568

561569
returnres;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp