forked from greenplum-db/gpdb-archive
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Truncate segment files of AO relations before unlink (#675)
Problem description: Segment files of the AO tables were not truncated before unlink. As a result, after relation drop, if there were file descriptors of segment files, not closed by some backend process, disk space was not returned to the OS. Root cause: In mdunlinkfork, mdunlink_ao is called for an AO relation instead of truncating all segment files. And mdunlink_ao doesn't perform truncation of segment files. Fix: Truncation of segment files for AO tables was added into mdunlink_ao_perFile, which is called from mdunlink_ao for each segment file. For that purpose, static function do_truncate was changed to global. Plus aomd unit test was updated. Reason - unit test calls mdunlink_ao with filenames of not-existing files. Unit test replaces unlink, so it can handle such filenames. But now mdunlink_ao_perFile returns before invoking unlink, because do_truncate fails to do truncation of these files. To fix it, do_truncate in aomd unit test was replaced with a stub during the test. Changes from original commit: 1. Added RESET for `default_tablespace` to previous test. (cherry picked from commit 6f0a2c1)
- Loading branch information
1 parent
e8aa067
commit 99968c6
Showing
6 changed files
with
63 additions
and
1 deletion.
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
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