From f6e6384cc040bc12e76f5abdbd43245abff8280c Mon Sep 17 00:00:00 2001 From: woblerr Date: Sat, 22 May 2021 23:48:05 +0300 Subject: [PATCH] Add configuration variables to README. --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b03594c..dcf0aee 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,21 @@ -Extension for PostgreSQL for collecting statistics about messages in logfile +Extension for PostgreSQL for collecting statistics about messages in logfile. + +Configuration variables: +* `logerrors.interval` - Time between writing statistic to buffer (ms). Default of **5s**, max of **60s**; +* `logerrors.intervals_count` - Count of intervals in buffer. Default of **120**, max of **360**. During this count of intervals messages doesn't dropping from statistic; +* `logerrors.excluded_errcodes` - Excluded error codes separated by "**,**". ## Install +The extension must be loaded via `shared_preload_libraries`. + Run psql command: $ CREATE EXTENSION logerrors; ## Usage - After creating extension you can call pg_log_errors_stats function in psql(without any arguments) + After creating extension you can call `pg_log_errors_stats()` function in psql (without any arguments). ``` postgres=# select * from pg_log_errors_stats();