- PostgreSQL 10 Administration Cookbook
- Simon Riggs Gianni Ciolli
- 106字
- 2021-06-25 22:04:05
How it works…
Suppose you change the value of a setting during your session, for example, by issuing this command:
SET work_mem = '16MB';
Then, the following will show up in the pg_settings catalog view:
postgres=# SELECT name, setting, reset_val, source
FROM pg_settings WHERE source = 'session';
name | setting | reset_val | source
----------+---------+-----------+---------
work_mem | 16384 | 1024 | session
This will show until you issue this command:
RESET work_mem;
After issuing it, the setting returns to reset_val and the source returns to default:
name | setting | reset_val | source
---------+---------+-----------+---------
work_mem | 1024 | 1024 | default