PG_CONF_LOAD_TIME

Return the timestamp when the server configuration was last loaded.

Category: miscReturns: TIMESTAMPTZDialect: PostgreSql

Syntax

PG_CONF_LOAD_TIME()

Description

## Overview Returns the TIMESTAMP WITH TIME ZONE at which the server configuration was most recently loaded. If the configuration has not been reloaded since startup, this value equals PG_POSTMASTER_START_TIME. Use this function to confirm whether a configuration change has taken effect, or to alert when config reloads happen unexpectedly. ## Session context - The value reflects the whole server, not the session. - Updates when an administrator issues a config reload. - Takes no arguments. - Never returns NULL. ## Behavior - Returns a TIMESTAMP WITH TIME ZONE. - Deterministic for a given server state. - Side effect free. ## Compatibility - PG-compat alias for `pg_conf_load_time` function.

Examples

-- Read the last config-load timestamp
SELECT PG_CONF_LOAD_TIME();
-- Compare with the server start time
SELECT PG_POSTMASTER_START_TIME() AS started, PG_CONF_LOAD_TIME() AS config_loaded;
-- Detect a config reload since startup
SELECT PG_CONF_LOAD_TIME() > PG_POSTMASTER_START_TIME() AS was_reloaded;
-- Include in a diagnostics snapshot
SELECT PG_CONF_LOAD_TIME() AS loaded_at, VERSION() AS engine;

Pitfalls

See Also

Open in interactive docs →   DeltaForge home →