PostgreSQL allows you to set some parameter settings for each session or transaction.
Changing parameters in your programs
How to do it…
Execute the following steps to set custom parameters settings:
- You can change the value of a setting during your session, like this:
SET work_mem = '16MB';
- This value will then be used for every future transaction. You can also change it only for the duration of the current transaction:
SET LOCAL work_mem = '16MB';
- The setting will last until you issue this command:
RESET work_mem;
- Alternatively, you can issue the following command:
RESET ALL;
The SET and RESET commands are SQL commands that can be issued from any interface. They apply only to PostgreSQL...