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.
Split temp tables storage from temp files storage (#889)
Some operations create temporary files on disk. The growth of temporary files in conjunction with temporary tables can lead to 100% usage of the data directory and an emergency stop of the DBMS. Implement temp_spill_files_tablespaces GUC that controls tablespaces where temporary files are stored. Temporary tables will still be stored in temp_tablespaces. In case temp_spill_files_tablespaces is not set: the behavior will remain the same, and both files and tables will be stored in the specified table spaces according to the list in temp_tablespaces, or if it's also empty, in system table spaces. If the temp_spill_files_tablespaces is not empty, but temp_tablespaces is empty, only temporary files will be saved in the specified table spaces. Temporary table files will still be stored in the system tablespace. If temp_spill_files_tablespaces is set to the empty string ("") or 'pg_default', it will not fall back to temp_tablespaces and will instead use the default tablespace. Changes from original commit: 1. Remove DITA format docs since they are missing in GPDB 7. 2. OpenNamedTemporaryFile is missing in GPDB 7, no fix needed. 3. Use GPDB 7 implementation of get_session_temp_tablespace instead of GPDB 6. 4. Additionally fix GetTempTablespaces (used by SharedFileSetInit) which now uses spill file tablespaces if there are any. 5. There is no GetSessionTempTableSpace, so call get_session_temp_tablespace directly from GetNextTempTableSpace. Test-related changes: 1. Add file_monitor.c from GPDB 6. 2. Add GNUMakefile entry for file_monitor from GPDB 6. 3. Add gp_tablespace_tmppath function to regress.c from GPDB 6. 4. Add plpython functions from GPDB 6 with fixes for GPDB 7 (switch to plpython3, add SETOF, add utf-8 encoding). 5. Fix last query from gp_tablespace_file_report to execute on primary segments using gp_segment_configuration. (cherry picked from commit 4bb482a)
- Loading branch information
1 parent
c9ba080
commit be22a27
Showing
15 changed files
with
943 additions
and
53 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
Oops, something went wrong.