From: | David Steele <david(at)pgmasters(dot)net> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | [PROPOSAL] Client Log Output Filtering |
Date: | 2015-11-25 13:22:41 |
Message-ID: | 5655B621.3080906@pgmasters.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Currently log messages generated by pgaudit can be made visible to the
client simply by altering client_min_messages. While this has not been
a showstopper for anyone it's ideal, either.
The client authentication code sets the global variable
ClientAuthInProgress which causes ereport() to filter client output <
ERROR while forcing client output >= ERROR. This functionality would
also work well for pgaudit.
The patch creates a new counter to separate the log filtering from the
authentication functionality. This makes it possible to get the same
filtering in other parts of the code (or extensions) without abusing the
ClientAuthInProgress variable or using the log hook.
I also considered a new function for ereport (like errhidecontext()) but
this mechanism would not have worked for authentication and so would not
have been used anywhere in core.
If there are no objections I'll submit it to the next commitfest.
--
-David
david(at)pgmasters(dot)net
Attachment | Content-Type | Size |
---|---|---|
ereport-v1.patch | text/plain | 4.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2015-11-25 13:27:57 | Re: pageinspect patch, for showing tuple data |
Previous Message | Michael Paquier | 2015-11-25 13:20:40 | Re: Re: In-core regression tests for replication, cascading, archiving, PITR, etc. |