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

Commit8b1ec7d

Browse files
committed
Fix error reporting after ioctl() call with pg_upgrade --clone
errno was not reported correctly after attempting to clone a file,leading to incorrect error reports. While scanning through the code, Ihave not noticed any similar mistakes.Error introduced in3a769d8.Author: Justin PryzbyDiscussion:https://postgr.es/m/20220731134135.GY15006@telsasoft.comBackpatch-through: 12
1 parent2827f10 commit8b1ec7d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/bin/pg_upgrade/file.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,12 @@ cloneFile(const char *src, const char *dst,
5757

5858
if (ioctl(dest_fd,FICLONE,src_fd)<0)
5959
{
60+
intsave_errno=errno;
61+
6062
unlink(dst);
63+
6164
pg_fatal("error while cloning relation \"%s.%s\" (\"%s\" to \"%s\"): %s",
62-
schemaName,relName,src,dst,strerror(errno));
65+
schemaName,relName,src,dst,strerror(save_errno));
6366
}
6467

6568
close(src_fd);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp