pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: bufmgr: Return early in ScheduleBufferTagForWriteback() if fsync
Date: Tue, 08 Oct 2024 16:57:17 +0000
Message-ID: <E1syDWP-002jSA-Rh@gemulon.postgresql.org> (raw)

bufmgr: Return early in ScheduleBufferTagForWriteback() if fsync=off

As pg_flush_data() doesn't do anything with fsync disabled, there's no point
in tracking the buffer for writeback. Arguably the better fix would be to
change pg_flush_data() to flush data even with fsync off, but that's a
behavioral change, whereas this is just a small optimization.

Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
Reviewed-by: Noah Misch <noah@leadboat.com>
Discussion: https://postgr.es/m/1f6b50a7-38ef-4d87-8246-786d39f46ab9@iki.fi

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/488f826c729bd570c36df369fa8ac90c9a5a1b46

Modified Files
--------------
src/backend/storage/buffer/bufmgr.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)



Message-ID: <E1syDWP-002jSA-Rh@gemulon.postgresql.org>
Permalink:  ../E1syDWP-002jSA-Rh@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1syDWP-002jSA-Rh@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: bufmgr: Return early in ScheduleBufferTagForWriteback() if fsync
  In-Reply-To: <E1syDWP-002jSA-Rh@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox