pendingOps table is not cleared with fsync=off

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: pendingOps table is not cleared with fsync=off
Date: 2020-05-08 21:21:18
Message-ID: 3cbc7f4b-a5fa-56e9-9591-c886deb07513@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
clear-pendingOps-with-fsync-off-1.patch text/x-patch 6.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2020-05-08 21:27:45 Re: refactoring basebackup.c
Previous Message Alvaro Herrera 2020-05-08 21:09:16 Re: 2pc leaks fds