SET SESSION MEMORYCAP
Limits how much memory can be allocated to any request in the current session. This limit only applies to the current session; it does not limit the total amount of memory used by multiple sessions.
Syntax
SET SESSION MEMORYCAP limit
Parameters
limit |
One of the following:
|
Privileges
- Superusers can increase session memory cap to any value.
- Non-superusers can only set the session memory cap to a value equal to or lower than their own user setting.
Examples
Set the session memory cap to 2 gigabytes:
=> SET SESSION MEMORYCAP '2G'; SET => SHOW MEMORYCAP; name | setting -----------+--------- memorycap | 2097152 (1 row)
Revert the memory cap to the default setting as specified in the user profile:
=> SET MEMORYCAP=DEFAULT; SET => SHOW MEMORYCAP; name | setting -----------+--------- memorycap | 2013336 (1 row)