pendingOps table is not cleared with fsync=off
Heikki Linnakangas <hlinnaka@iki.fi>
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-05-08T21:21:18Z
Lists: pgsql-hackers
Attachments
- clear-pendingOps-with-fsync-off-1.patch (text/x-patch) patch
Hi! I noticed that commit 3eb77eba5a changed the logic in ProcessSyncRequests() (formerly mdsync()) so that if you have fsync=off, the entries are not removed from the pendingOps hash table. I don't think that was intended. I propose the attached patch to move the test for enableFsync so that the entries are removed from pendingOps again. It looks larger than it really is because it re-indents the block of code that is now inside the "if (enableFsync)" condition. - Heikki
Commits
-
Move check for fsync=off so that pendingOps still gets cleared.
- 891a2007e398 12.4 landed
- e8abf585ab45 13.0 landed
-
Refactor the fsync queue for wider use.
- 3eb77eba5a51 12.0 cited