Documentation Home
MySQL 8.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 38.1Mb
PDF (A4) - 38.1Mb
PDF (RPM) - 33.0Mb
HTML Download (TGZ) - 8.1Mb
HTML Download (Zip) - 8.1Mb
HTML Download (RPM) - 6.9Mb
Man Pages (TGZ) - 132.7Kb
Man Pages (Zip) - 189.0Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
Excerpts from this Manual The ps_setup_save() Procedure

Saves the current Performance Schema configuration. This enables you to alter the configuration temporarily for debugging or other purposes, then restore it to the previous state by invoking the ps_setup_reload_saved() procedure.

To prevent other simultaneous calls to save the configuration, ps_setup_save() acquires an advisory lock named sys.ps_setup_save by calling the GET_LOCK() function. ps_setup_save() takes a timeout parameter to indicate how many seconds to wait if the lock already exists (which indicates that some other session has a saved configuration outstanding). If the timeout expires without obtaining the lock, ps_setup_save() fails.

It is intended you call ps_setup_reload_saved() later within the same session as ps_setup_save() because the configuration is saved in TEMPORARY tables. ps_setup_save() drops the temporary tables and releases the lock. If you end your session without invoking ps_setup_save(), the tables and lock disappear automatically.

This procedure requires the SYSTEM_VARIABLES_ADMIN or SUPER privilege because it manipulates the session sql_log_bin system variable to disable binary logging during its execution.

  • in_timeout INT: How many seconds to wait to obtain the sys.ps_setup_save lock. A negative timeout value means infinite timeout.

mysql> CALL ps_setup_save(10);

... make Performance Schema configuration changes ...

mysql> CALL ps_setup_reload_saved();

User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.