pgdisablelogerror
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pgdisablelogerror | 1.0 | ADMIN | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 5260 | pgdisablelogerror | No | Yes | Yes | Yes | No | Yes | - |
PGDG RPM and Pigsty DEB package fmbiete/pgdisablelogerror 1.0; control is relocatable=true and requires shared_preload_libraries.
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PGDG | 1.0 | 1817161514 | pgdisablelogerror | - |
| RPM | PGDG | 1.0 | 1817161514 | pgdisablelogerror_$v | - |
| DEB | PIGSTY | 1.0 | 1817161514 | postgresql-$v-pgdisablelogerror | - |
Build
You can build the RPM / DEB packages for pgdisablelogerror using pig build:
Install
You can install pgdisablelogerror directly. First, make sure the PGDG repository is added and enabled:
Install the extension using pig or apt/yum/dnf:
Preload:
Create Extension:
Usage
Sources: README, v1.0 release, control file
pgdisablelogerror suppresses PostgreSQL server log entries for configured SQLSTATE error codes. It is useful when expected application errors, such as duplicate-key violations, are too noisy in the server log.
Enable The Hook
Load the module and restart PostgreSQL:
Create the extension once in the postgres database:
Configure SQLSTATE Codes
Set pgdisablelogerror.sqlerrcode to a comma-separated list of SQLSTATE codes:
An empty or NULL value disables suppression:
To identify SQLSTATE values in normal PostgreSQL logs, add %e to log_line_prefix.
Caveats
- Version 1.0 supports PostgreSQL 14-18.
- This extension affects logging, not error behavior. Clients still receive the original error.
- Use narrow SQLSTATE lists. Suppressing broad error classes can hide real operational problems.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)