pgaudit and create postgis extension logs a lot inserts

Поиск
Список
Период
Сортировка
От Svensson Peter
Тема pgaudit and create postgis extension logs a lot inserts
Дата
Msg-id 1CC6B04B8F153C4CBE486B1C7FD897430269E49962@WINVMSERV463.ad.smhi.se
обсуждение исходный текст
Ответы Re: pgaudit and create postgis extension logs a lot inserts  (Joe Conway <mail@joeconway.com>)
Re: pgaudit and create postgis extension logs a lot inserts  (David Steele <david@pgmasters.net>)
Список pgsql-performance
Hi,

I have installed pgaudit, and configured as:
pgaudit.log = 'ddl,role'
pgaudit.log_level = 'log'  (default)

Versions:  postgresql96 (9.6.6) , pgaudit96 (1.0.4), postgis 2.3.2,  Rhel 7.4

When I then install  postgis extension in a database it writes a huge amount of logs which slow down the server a lot.
Not only table creation and functions are logged,  even  all inserts in  spatial_ref_sys are written to the audit-log.

LOG:  AUDIT: SESSION,1,1,DDL,CREATE FUNCTION,,,"
......
INSERT INTO ""spatial_ref_sys"" (""srid"",""auth_name"
....

This behaviour make pgaudit useless in our environment due to the overhead in log-file write.
I have tried different combinations of  pgaudit.log  settings (role,-functions), (role),  and also changed pgaudit.log_level to  warning, but it was not better.

Does anybody have a useful  pgaudit settings which not overflow the log files, even when installing postgis or other extensions?

Also noticed that setting a session log to none (set pgaudit.log='none';)  overrides parameter from postgresql.conf,  but does not get logged, and then you can do whatever you want without any audit.
I supposed this changing of  audit session log parameter should be logged to file?


Regards,
Peter

В списке pgsql-performance по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Query is slow when run for first time; subsequent execution isfast
Следующее
От: Rambabu V
Дата:
Сообщение: need help on memory allocation