2ndQuadrant / audit-trigger

Simple, easily customised trigger-based auditing for PostgreSQL (Postgres). See also pgaudit.
Other
657 stars 241 forks source link

Performance suggestion #5

Closed asenyshyn closed 10 years ago

asenyshyn commented 10 years ago

Hi,

Did you consider to replace (SELECT setting FROM pg_settings WHERE name = 'application_name') with current_setting('application_name').

It changes performance of the trigger for me quite a lot.

ringerc commented 10 years ago

On 07/15/2014 04:22 PM, asenyshyn wrote:

Hi,

Did you consider to replace (SELECT setting FROM pg_settings WHERE name = 'application_name') with current_setting('application_name').

It changes performance of the trigger for me quite a lot.

Good idea. Feel free to send a pull request or directly edit it and I'll approve the change.

Otherwise I'll get to it when I have a chance to test it.

Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

asenyshyn commented 10 years ago

Sure, just have not time for it now, thus I leave the idea here, so it won't be lost.