1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-25 20:23:07 +03:00

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
This commit is contained in:
Tom Lane
2018-04-28 17:45:02 -04:00
parent cfffe83ba8
commit 9cb7db3f0c
7 changed files with 29 additions and 19 deletions

View File

@@ -282,7 +282,7 @@ CheckpointerMain(void)
/* we needn't bother with the other ResourceOwnerRelease phases */
AtEOXact_Buffers(false);
AtEOXact_SMgr();
AtEOXact_Files();
AtEOXact_Files(false);
AtEOXact_HashTables(false);
/* Warn any waiting backends that the checkpoint failed. */