pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: In AtEOXact_Files, complain if any files remain unclosed at comm
Date: Sat, 28 Apr 2018 21:45:09 +0000
Message-ID: <E1fCXeX-00040u-2d@gemulon.postgresql.org> (raw)

In AtEOXact_Files, complain if any files remain unclosed at commit.

This change makes this module act more like most of our other low-level
resource management modules.  It's a caller error if something is not
explicitly closed by the end of a successful transaction, so issue
a WARNING about it.  This would not actually have caught the file leak
bug fixed in commit 231bcd080, because that was in a transaction-abort
path; but it still seems like a good, and pretty cheap, cross-check.

Discussion: https://postgr.es/m/152056616579.4966.583293218357089052@wrigleys.postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9cb7db3f0c1f554cdcbbd97f78a119a19756e6ef

Modified Files
--------------
src/backend/access/transam/xact.c     |  6 +++---
src/backend/postmaster/autovacuum.c   |  2 +-
src/backend/postmaster/bgwriter.c     |  2 +-
src/backend/postmaster/checkpointer.c |  2 +-
src/backend/postmaster/walwriter.c    |  2 +-
src/backend/storage/file/fd.c         | 32 +++++++++++++++++++++-----------
src/include/storage/fd.h              |  2 +-
7 files changed, 29 insertions(+), 19 deletions(-)



Message-ID: <E1fCXeX-00040u-2d@gemulon.postgresql.org>
Permalink:  ../E1fCXeX-00040u-2d@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1fCXeX-00040u-2d@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: In AtEOXact_Files, complain if any files remain unclosed at comm
  In-Reply-To: <E1fCXeX-00040u-2d@gemulon.postgresql.org>
  References: <E1fCXeX-00040u-2d@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