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

Commitb8e19b9

Browse files
committed
Flush logical mapping files with fd opened for read/write at checkpoint
The file descriptor was opened with read-only to fsync a regular file,which would cause EBADFD errors on some platforms.This is similar to the recent fix done bya586cc4 (which was broken byme with82a5649), except that I noticed this issue while monitoring thebackend code for similar mistakes. Backpatch to 9.4, as this has beenintroduced since logical decoding exists as ofb89e151.Author: Michael PaquierReviewed-by: Andres FreundDiscussion:https://postgr.es/m/20191006045548.GA14532@paquier.xyzBackpatch-through: 9.4
1 parent1634d36 commitb8e19b9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/backend/access/heap/rewriteheap.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,8 @@ CheckPointLogicalRewriteHeap(void)
12801280
}
12811281
else
12821282
{
1283-
intfd=OpenTransientFile(path,O_RDONLY |PG_BINARY);
1283+
/* on some operating systems fsyncing a file requires O_RDWR */
1284+
intfd=OpenTransientFile(path,O_RDWR |PG_BINARY);
12841285

12851286
/*
12861287
* The file cannot vanish due to concurrency since this function

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp