RE: pgaudit and create postgis extension logs a lot inserts

From: Karen Stone <kstone(at)eldocomp(dot)com>
To: Svensson Peter <peter(dot)svensson(at)smhi(dot)se>, Joe Conway <mail(at)joeconway(dot)com>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: RE: pgaudit and create postgis extension logs a lot inserts
Date: 2018-01-19 12:24:49
Message-ID: 004f4d185296497b8dd42a8469111a99@eldocomp.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Please remove me from this list. Thanks.

Karen Stone| Technical Services| Eldorado |a Division of MphasiS
5353 North 16th Street, Suite 400, Phoenix, Arizona 85016-3228
Tel (928) 892 5735 | www.eldoinc.com | www.mphasis.com |kstone(at)eldocomp(dot)com

-----Original Message-----
From: Svensson Peter [mailto:peter(dot)svensson(at)smhi(dot)se]
Sent: Friday, January 19, 2018 4:04 AM
To: Joe Conway <mail(at)joeconway(dot)com>; pgsql-performance(at)postgresql(dot)org
Subject: SV: pgaudit and create postgis extension logs a lot inserts

A test to create postgis extension made 4 rsyslog processes run for several minutes with high cpu util, and when you have only 8 cpu:s this take lot of resources.
The create command also have to wait until all the log are written so there are great impact.
Log file got 16 GB big only for this.

We have several databases in the same server, some of them with postgis.
Those databases are maintained bye different people, and tell them to disable pgaudit every time they are doing something that can cause lot log will create a bad behaviour, especially when we cannot see in the logs that they have disabled pgaudit.

I think postgis extension is not the only extention that creates both tables, functions and insert data, but if there are a way to configure pgaudit so you get rid of the inserts maybe its a way to handle it.

/Peter
________________________________________
Från: Joe Conway [mail(at)joeconway(dot)com]
Skickat: den 18 januari 2018 17:54
Till: Svensson Peter; pgsql-performance(at)postgresql(dot)org
Ämne: Re: pgaudit and create postgis extension logs a lot inserts

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?

Joe

--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises Consulting, Training, & Open Source Development

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message David Steele 2018-01-19 13:41:42 Re: pgaudit and create postgis extension logs a lot inserts
Previous Message Magnus Hagander 2018-01-19 11:05:43 Re: pgaudit and create postgis extension logs a lot inserts