]> granicus.if.org Git - postgresql/commit
In AtEOXact_Files, complain if any files remain unclosed at commit.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 28 Apr 2018 21:45:02 +0000 (17:45 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 28 Apr 2018 21:45:02 +0000 (17:45 -0400)
commit9cb7db3f0c1f554cdcbbd97f78a119a19756e6ef
tree0e8c68a72d14e3218264284990de9c3bf768e36f
parentcfffe83ba82021a1819a656e7ec5c28fb3a99152
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
src/backend/access/transam/xact.c
src/backend/postmaster/autovacuum.c
src/backend/postmaster/bgwriter.c
src/backend/postmaster/checkpointer.c
src/backend/postmaster/walwriter.c
src/backend/storage/file/fd.c
src/include/storage/fd.h