pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove some obsolete smgrcloseall() calls.
Date: Wed, 31 Jan 2024 11:02:23 +0000
Message-ID: <E1rV8MJ-003yw5-4I@gemulon.postgresql.org> (raw)

Remove some obsolete smgrcloseall() calls.

Before the advent of PROCSIGNAL_BARRIER_SMGRRELEASE, we didn't have a
comprehensive way to deal with Windows file handles that get in the way
of unlinking directories.  We had smgrcloseall() calls in a few places
to try to mitigate.

It's still a good idea for bgwriter and checkpointer to do that once per
checkpoint so they don't accumulate unbounded SMgrRelation objects, but
there is no longer any reason to close them at other random places such
as the error path, and the explanation as given in the comments is now
obsolete.

Author: Thomas Munro
Reviewed-by: Heikki Linnakangas, Robert Haas
Discussion: https://www.postgresql.org/message-id/CA%2BhUKGJ8NTvqLHz6dqbQnt2c8XCki4r2QvXjBQcXpVwxTY_pvA@mail.gma...

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6a8ffe812d194ba6f4f26791b6388a4837d17d6c

Modified Files
--------------
src/backend/postmaster/bgwriter.c     | 7 -------
src/backend/postmaster/checkpointer.c | 7 -------
src/backend/postmaster/walwriter.c    | 7 -------
3 files changed, 21 deletions(-)



Message-ID: <E1rV8MJ-003yw5-4I@gemulon.postgresql.org>
Permalink:  ../E1rV8MJ-003yw5-4I@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rV8MJ-003yw5-4I@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: heikki.linnakangas@iki.fi, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Remove some obsolete smgrcloseall() calls.
  In-Reply-To: <E1rV8MJ-003yw5-4I@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