RESET is a session-level command, primarily available in PostgreSQL, that clears a previously changed run-time parameter and restores the server’s built-in default (or the value defined in postgresql.conf). It affects only the current database connection and does not persist after the session ends. RESET ALL reverts every modifiable setting, while RESET parameter_name targets a single variable. Because it is transactional, a RESET issued inside a transaction block can be rolled back. When a RESET takes effect, the server re-computes dependent caches (e.g., planner settings). The command requires no special privileges unless the parameter itself is superuser-only.
ALL
- Keyword that instructs PostgreSQL to reset every configurable parameter.SET, SHOW, ALTER SYSTEM, DISCARD, BEGIN/COMMIT, SESSION variables
PostgreSQL 7.3
RESET targets a single parameter. RESET ALL reverts every modifiable parameter in the session.
Yes. Because RESET is transactional, issuing ROLLBACK will undo the RESET and restore the previous parameter value.
Parameters classified as PGC_POSTMASTER can only be changed in postgresql.conf and need a server restart. They cannot be reset at session level.
No. MySQL uses RESET for administrative commands (e.g., RESET SLAVE) but has no equivalent of PostgreSQL’s session-parameter RESET.