Setting configuration parameters in your programs
PostgreSQL allows you to override some parameter settings for each session or transaction using SQL commands. Here are some examples of parameters that are designed to be user-modifiable:
application_name
—to help identify the session for monitoringsynchronous_commit
—to set the level of durability desired- Various timeouts and check intervals:
client_connection_check_interval
idle_on_transaction_session_timeout
idle_session_timeout
lock_timeout
statement_timeout
- Client-tuning parameters:
commit_siblings
cursor_tuple_fraction
maintenance_work_mem
vacuum_cost_delay
work_mem
- Data type-specific settings:
bytea_output
DateStyle
xmlbinary
xmloption
- Optimization settings (too many to list, but not normally changed)
How to do it…
Execute the following steps to set custom parameters:
- You can change the value of a setting during your session, like this:
SET work_mem = '16MB&apos...