From 9cb7db3f0c1f554cdcbbd97f78a119a19756e6ef Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 28 Apr 2018 17:45:02 -0400 Subject: 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/include/storage/fd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/include') diff --git a/src/include/storage/fd.h b/src/include/storage/fd.h index 484339b7690..548a832be94 100644 --- a/src/include/storage/fd.h +++ b/src/include/storage/fd.h @@ -123,7 +123,7 @@ extern void SetTempTablespaces(Oid *tableSpaces, int numSpaces); extern bool TempTablespacesAreSet(void); extern int GetTempTablespaces(Oid *tableSpaces, int numSpaces); extern Oid GetNextTempTableSpace(void); -extern void AtEOXact_Files(void); +extern void AtEOXact_Files(bool isCommit); extern void AtEOSubXact_Files(bool isCommit, SubTransactionId mySubid, SubTransactionId parentSubid); extern void RemovePgTempFiles(void); -- cgit v1.2.3