SV: pgaudit and create postgis extension logs a lot inserts

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

Regards,
Peter
________________________________________
Från: David Steele [david@pgmasters.net]
Skickat: den 19 januari 2018 14:41
Till: Magnus Hagander; Joe Conway
Kopia: Svensson Peter; pgsql-performance@postgresql.org
Ämne: Re: pgaudit and create postgis extension logs a lot inserts

On 1/19/18 6:05 AM, Magnus Hagander wrote:
>
>
> On Thu, Jan 18, 2018 at 6:54 PM, Joe Conway <mail@joeconway.com
> <mailto:mail@joeconway.com>> wrote:
>
>     On 01/18/2018 04:12 AM, Svensson Peter wrote:
>     > 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.
>
>     How often do you intend to install PostGIS? Disable pgaudit, install
>     PostGIS, enable pgaudit?
>
>
> Would it make sense for pgaudit to, at least by option, not include DDL
> statements that are generated as "sub-parts" of a CREATE EXTENSION? It
> should still log the CREATE EXTENSION of course, but not necessarily all
> the contents of it, since that's actually defined in the extension
> itself already?
That's doable, but I think it could be abused if it was always on and
installing extensions is generally not a daily activity.

It seems in this case the best action is to disable pgaudit before
installing postgis or install postgis first.

Regards,
--
-David
david@pgmasters.net


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

Предыдущее
От: pavan95
Дата:
Сообщение: Re: 8.2 Autovacuum BUG ?
Следующее
От: Sergei Kornilov
Дата:
Сообщение: Re: 8.2 Autovacuum BUG ?