-
Notifications
You must be signed in to change notification settings - Fork 15
Add the temp_tables_stat extension #291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: OPENGPDB_STABLE
Are you sure you want to change the base?
Conversation
| * last_prev_node != NULL because last_node is not head. | ||
| * next_node() has been called, so the mapping exists. | ||
| */ | ||
| dsm_detach(dsm_find_mapping(last_prev_node->next)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not so sure if it is safe to call dsm_detach while holding a lock, because dsm_detach calls user defined callbacks and so forth.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
user defined callbacks are not used. What are potential problems?
This extension is useful to find out how much disk space is occupied by
temporary tables and which user created them in which session.
The extension tracks the creation and deletion of temporary table files on
segments. The list of files is stored in the shared memory of each segment.
If memory allocated using ShmemInitStruct is not enough, the extension uses DSM.
The extension adds the tts_get_seg_files function to get the tracked files,
their sizes, user and session where they was created from segments.
Add the ic-temp_tables_stat test for the extension.