Skip to content
Discord Get Started

Session Parameters

Session-level configuration with SET/SHOW.

SQL
SET variable = value; -- session-scoped
SET LOCAL variable = value; -- transaction-scoped
SHOW variable;
SHOW ALL; -- list all parameters
RESET variable;
RESET ALL;
-- Functions
SELECT current_setting('variable_name');
SELECT set_config('variable_name', 'value', false);

SHOW ALL is the authoritative list — it reports every parameter this server recognises, with its current value and, where one exists, a description.

ParameterDefaultMutableDescription
application_name''YesApplication name for the session
bytea_outputhexYesOutput format for bytea values
client_encodingUTF8YesClient-side character encoding
client_min_messagesnoticeYesMinimum message severity sent to client
datestyleISO, MDYNoDate display format
default_transaction_isolationread committedYesDefault isolation level for subsequent transactions
default_transaction_read_onlyoffYesDefault read-only state for new transactions; writes are rejected with SQLSTATE 25006 — see Transactions
extra_float_digits1YesExtra precision for floating-point output
search_path$user, publicYesSchema search order
server_encodingUTF8NoServer-side character encoding
server_version16.0NoReported PostgreSQL version
standard_conforming_stringsonNoTreat backslashes literally in strings. SET standard_conforming_strings = off is rejected — the parser always treats backslashes literally
statement_timeout60000msYesQuery timeout (0 = no limit)
timezoneUTCYesSession timezone
transaction_isolationread committedYesCurrent transaction isolation level
lock_timeout0YesLock acquisition timeout
password_encryptionscram-sha-256YesPassword hashing algorithm
max_identifier_length63NoMaximum identifier length
lc_messagesCYesLocale for messages

Other accepted PostgreSQL parameters: default_table_access_method, default_tablespace, default_text_search_config, default_transaction_deferrable, idle_in_transaction_session_timeout, in_hot_standby, integer_datetimes, intervalstyle, lc_monetary, lc_numeric, lc_time, max_index_keys, row_security, xmloption.

Also readable with SHOW, reporting server state rather than a session preference: is_superuser, listen_addresses, max_connections (1000), port (5432), role, server_version_num (160000), session_authorization, transaction_deferrable, and transaction_read_only.

Two parameters are accepted but inert: work_mem (4MB) and check_function_bodies (on). A SET succeeds and SHOW reports the value you just set, but neither changes any behaviour — the same pattern as db9.use_optimizer below. For sort memory the parameter that does take effect is db9.max_sort_bytes:

SQL
SET work_mem = '64MB'; -- accepted; SHOW returns 64MB; changes nothing
SET db9.max_sort_bytes = 1048576; -- this is the real knob (default 134217728)

See sort memory limits.

check_function_bodies has nothing to switch off: DB9 does not validate a LANGUAGE sql function body at CREATE FUNCTION time under either setting. A body that cannot parse is stored, and fails only when the function is first called, so test every function you create:

SQL
CREATE FUNCTION broken() RETURNS int AS $$ this is not valid sql $$ LANGUAGE sql;
-- CREATE FUNCTION (accepted with check_function_bodies both on and off)
SELECT broken();
-- ERROR: syntax error: sql parser error: Expected an SQL statement, found: this (42601)

PostgreSQL rejects that CREATE FUNCTION outright when check_function_bodies is on.

LANGUAGE plpgsql bodies are checked for block structure and for the types named in declarations, but not for the SQL inside them. A missing BEGIN, an IF without END IF, an assignment with no expression, or a misspelled RAISE level is rejected at CREATE FUNCTION with 42601 (for example PL/pgSQL function must have BEGIN block), and a DECLARE of an unknown type with 42704; in either case the function is not created. The SQL statements inside the block are not checked, so the same advice applies:

SQL
CREATE FUNCTION broken_pl() RETURNS int AS $$ BEGIN SELEC 1; RETURN 1; END $$ LANGUAGE plpgsql;
-- CREATE FUNCTION
SELECT broken_pl();
-- ERROR: syntax error: sql parser error: Expected an SQL statement, found: SELEC (42601)

PostgreSQL rejects that CREATE FUNCTION too.

ParameterDefaultDescription
db9.hash_join_work_mem67108864 (64 MB)Memory limit for the hash join build side (0 = unlimited)
db9.dml_table_scan_max_rows10000Max rows per auxiliary source for UPDATE FROM / DELETE USING (0 = unlimited)
db9.max_sort_bytes134217728 (128 MB)Memory limit for sort operations
db9.prepared_plan_cache_size128Prepared statement plan cache size
db9.prepared_plan_cache_min_exec5Min executions before plan cache promotion
db9.retry_max_attempts64Max retry attempts for autocommit DML/DDL on write conflict
db9.retry_timeout0Max wall-time for retries per statement (0 = no limit)
db9.use_optimizeronCost-based optimizer (always on; SET ... = off is accepted but is a no-op)
db9.password_grace_seconds0Grace period in seconds during which the old password still works after ALTER ROLE ... WITH PASSWORD (0 = immediate replacement)
db9.enable_cop_pushdownoffEnable coprocessor pushdown planning
ParameterDefaultDescription
embedding.providerplatform-providedEmbedding provider: openai or bedrock (session override)
embedding.endpointplatform-providedEmbedding service endpoint URL (session override)
embedding.modelplatform-providedModel name
embedding.api_keyplatform-provided, redacted as ****Embedding service API key (session override)
embedding.dimensionsplatform-providedOutput vector dimensions
embedding.concurrency5Max concurrent embedding calls
embedding.max_calls100Max embedding calls per statement

Every embedding.* parameter already has a working value on a new database — the built-in embedding service needs no configuration. Setting them overrides the platform default for the session. Read the live values with SHOW embedding.provider / SHOW embedding.model rather than assuming they are unset; embedding.api_key always reads back as ****.

ParameterDefaultDescription
hnsw.ef_search40Dynamic candidate list size for HNSW index search