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

Commit9010156

Browse files
committed
Fix thinko introduced by82a5649 in slot.c
When saving a replication slot, failing to close the temporary path usedto save the slot information is considered as a failure and reported assuch. However the code forgot to leave immediately as other failurepaths do.Noticed while looking up at this area of the code for another patch.
1 parent47ac203 commit9010156

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎src/backend/replication/slot.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,10 +1316,13 @@ SaveSlotToPath(ReplicationSlot *slot, const char *dir, int elevel)
13161316
pgstat_report_wait_end();
13171317

13181318
if (CloseTransientFile(fd))
1319+
{
13191320
ereport(elevel,
13201321
(errcode_for_file_access(),
13211322
errmsg("could not close file \"%s\": %m",
13221323
tmppath)));
1324+
return;
1325+
}
13231326

13241327
/* rename to permanent file, fsync file and directory */
13251328
if (rename(tmppath,path)!=0)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp