pg_logger is an extension to send log statement via libcurl to external logging engine.
This extension is compatible with PostgreSQL 10 and higher.
- Get latest
pg_errors
sources:
git clone https://github.com/pgtoolz/pg_errors
- Get latest PostgreSQL sources:
git clone https://github.com/postgres/postgres.git -b REL_16_STABLE && cd postgres
-
Compile and install PostgreSQL
-
Compile and install
pg_errors
extension
USE_PGXS=1 make -C /path/to/pg_errors/ install
- Configure extension
echo "shared_preload_libraries = 'pg_errors'" >> postgres_data/postgresql.conf
- Run PostgreSQL and create
pg_errors
extension
postgres=# CREATE EXTENSION pg_errors;
- pg_errors — returns current statistics
- pg_errors_reset() — reset statistics
Usually, you have to only install new version of pg_errors
, do ALTER EXTENSION 'pg_errors' UPDATE;
and restart PostgreSQL.
TODO
- do not rely on PostgreSQL shmem
- flag to disable extension