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

Commit3c8aa66

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 parent210981a commit3c8aa66

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
@@ -406,7 +406,12 @@ _PrintFileData(ArchiveHandle *AH, char *filename)
406406
buflen=ZLIB_OUT_SIZE;
407407

408408
while ((cnt=cfread(buf,buflen,cfp)))
409+
{
410+
/* Are we aborting? */
411+
checkAborting(AH);
412+
409413
ahwrite(buf,1,cnt,AH);
414+
}
410415

411416
free(buf);
412417
if (cfclose(cfp)!=0)
@@ -543,6 +548,9 @@ _ReadBuf(ArchiveHandle *AH, void *buf, size_t len)
543548
{
544549
lclContext*ctx= (lclContext*)AH->formatData;
545550

551+
/* Are we aborting? */
552+
checkAborting(AH);
553+
546554
/*
547555
* If there was an I/O error, we already exited in cfread(), so here we
548556
* exit on short reads.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp