Skip to content

pgx_warnings

PostgreSQL extension that watches and collects all warnings and errors from the PostgreSQL log file and sends notifications to the Telegram channel.

pgx_warnings · PostgreSQL extension that watches and collects all warnings and errors from the PostgreSQL log file and sends notifications to the Telegram channel.

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
101711pgx_warningspgx_warnings1.0STATUnknownC

Usage

Sources:

pgx_warnings — A PostgreSQL extension that captures all WARNING, ERROR, FATAL, and PANIC messages from the server log in real time and sends instant notifications to a Telegram channel. Use it when collecting or interpreting the corresponding PostgreSQL statistics. Use the pinned upstream revision linked above as the API boundary and test it on the target PostgreSQL build.

Core Workflow

CREATE EXTENSION pgx_warnings;

Install the extension in the intended database, run the smallest upstream example above when available, and verify the installed version and returned values before integrating it into application SQL.

Important Objects

  • pgx_warnings_clear() is an extension function and returns void.
  • pgx_warnings_list(IN max_entries integer DEFAULT 100, OUT "timestamp" timestamptz, OUT level text, OUT database text, OUT message text, OUT pid integer, OUT sent boolean) is an extension function and returns SETOF.
  • pgx_warnings_stats(OUT current_entries integer, OUT buffer_size integer, OUT total_captured bigint, OUT total_sent bigint, OUT total_failed bigint, OUT enabled boolean) is an extension function and returns record.
  • pgx_warnings_test() is an extension function and returns text.
  • pgx_warnings is an extension-defined view.
  • pgx_warnings_info is an extension-defined view.

Requirements and Caveats

  • The reviewed control file declares default version 1.0.
  • The control file marks the extension as non-relocatable.
  • The control file requires a superuser for installation.
  • Confirm privileges, supported PostgreSQL versions, upgrade behavior, and failure cases against the pinned source before production use.

Table reader