Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config variable to ignore errors by errcodes #11

Merged
merged 1 commit into from
Apr 14, 2021
Merged

Conversation

munakoiso
Copy link
Owner

Better would be to use error names. But in this case we can't disable custom error codes

 logerrors.excluded_errcodes 
-----------------------------
 16801924,33816706
(1 row)

Time: 0.280 ms
sas-i08x4169z36l1l1t/postgres M # select 1/0;
ERROR:  22012: division by zero
LOCATION:  int4div, int.c:824
Time: 0.240 ms
sas-i08x4169z36l1l1t/postgres M # asd;
ERROR:  42601: syntax error at or near "asd"
LINE 1: asd;
        ^
LOCATION:  scanner_yyerror, scan.l:1149
Time: 0.194 ms
sas-i08x4169z36l1l1t/postgres M # \c asd
FATAL:  database "asd" does not exist
Previous connection kept
sas-i08x4169z36l1l1t/postgres M # select * from pg_log_errors_stats();
 time_interval |  type   |           message            | count 
---------------+---------+------------------------------+-------
        [null] | WARNING | TOTAL                        |     0
        [null] | ERROR   | TOTAL                        |     0
        [null] | FATAL   | TOTAL                        |     1
             5 | FATAL   | ERRCODE_INVALID_CATALOG_NAME |     1
           600 | FATAL   | ERRCODE_INVALID_CATALOG_NAME |     1
(5 rows)

Time: 0.689 ms```

@munakoiso munakoiso changed the title config variable to exclude errors by errcodes config variable to ignore errors by errcodes Apr 14, 2021
@munakoiso munakoiso merged commit 317aeb2 into master Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants