pg_log_standby_snapshot() — PostgreSQL system administration function

pg_log_standby_snapshot(): log details of the current snapshot to WAL. PostgreSQL system administration functions — signature, volatility, version applicability and an illustrative example.

Summary

pg_log_standby_snapshot is a PostgreSQL built-in function in the System Administration Functions group. PostgreSQL’s system catalog (pg_proc) describes it as: “log details of the current snapshot to WAL”.

Signature

pg_log_standby_snapshot() → pg_lsn

Argument and return types are taken from the pg_proc catalog; internal type names are shown using their readable SQL spellings (for example int4 is shown as integer). (Derived from the catalog — see the linked reference for the canonical documentation.)

Classification

  • Category: System Administration Functions
  • Kind: Function
  • Volatility: VOLATILE — Marked VOLATILE — its result can change even within a single statement (for example, it may depend on time, sequences or the current session).
  • Returns: pg_lsn

Example

Illustrative form (replace placeholder values with your own data):

SELECT pg_log_standby_snapshot();

The example above is illustrative and is meant to show calling syntax only; consult the linked PostgreSQL documentation for exact semantics, edge cases and accepted argument combinations.

Version applicability

Based on the catalog across releases, pg_log_standby_snapshot first appears in PostgreSQL 16. It is present in: 16, 17, 18.

Related & references

Reference: PostgreSQL documentation — System Administration Functions.