forked from greenplum-db/gpdb-archive
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Problem: In cases where an AO table is created, some data is inserted, and then the table is dropped, file descriptor of segfile will be opened still. It stays open until session ends. Thus, disc space is not freed until the end of the session. Cause: There are 2 issues: 1) mdcreate_ao is used to create a segment file during data insertion. For creation, it calls PathNameOpenFile without closing. File descriptor returned by PathNameOpenFile in mdcreate_ao is not stored anywhere except the virtual file level (fd.c), where it will be cleaned some time later only when the number of opened descriptors reaches threshold. 2) second issue happens when we run out of space. This problem is related to file descriptors left open because of an abnormal abort of the insert command. In function BufferedAppendWrite, once free space has ended, ereport is thrown. Before that, the file is not closed, so after the long jump it remained open. Fix: Add FileClose to mdcreate_ao and BufferedAppendWrite (before throwing ereport).
- Loading branch information
Showing
4 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters