Opened 2 years ago

Closed 2 years ago

#5076 closed defect (fixed)

Extension install with pgaudit in place generates log explosion

Reported by: pramsey Owned by: pramsey
Priority: medium Milestone: PostGIS 3.3.0
Component: build Version: 3.2.x
Keywords: Cc:

Description

Install pgaudit. Set pgaudit.log to anything other than 'none'. Run create extension postgis. Watch your logs get very very very very large. It would be nice if pgaudit didn't explode when extensions with large install files ran. In the meanwhile we probably don't want to do this to people running pgaudit.

Change History (9)

comment:1 by pramsey, 2 years ago

I see two possible approaches,

  • Test for the presence of a non-none pgaudit setting at the start of extension script and just error out with a useful message, like "set pgaudit.log to none!"
  • Automatically flip the pgaudit mode to none at the top of the script if it's not already none, and then flip it back to its real value at the end. This seems magical and potentially adds complexity to no great benefit. Example implementation https://gist.github.com/pramsey/4c65bc65b753efed52955be6bd60e507

comment:2 by robe, 2 years ago

This is only an issue in create extension and upgrade extension or is it an issue also during general use? If only an install/upgrade concern, this should be under build/upgrade/install section no? And then pass it off to strk to deal with :)

comment:3 by pramsey, 2 years ago

Component: postgisbuild/upgrade/install
Owner: changed from pramsey to strk

It's an issue during create.

comment:4 by pramsey, 2 years ago

Owner: changed from strk to pramsey

comment:5 by Paul Ramsey <pramsey@…>, 2 years ago

In 7f09101/git:

Halt PostGIS extension install if pgaudit is active and logging. Avoids multi-gigabyte log explosion. References #5076

comment:6 by Paul Ramsey <pramsey@…>, 2 years ago

In 87bc7f3/git:

Halt PostGIS extension install if pgaudit is active and logging. Avoids multi-gigabyte log explosion. References #5076

comment:7 by Paul Ramsey <pramsey@…>, 2 years ago

In 7f09101/git:

Halt PostGIS extension install if pgaudit is active and logging. Avoids multi-gigabyte log explosion. References #5076

comment:8 by Paul Ramsey <pramsey@…>, 2 years ago

In 1a90fe80/git:

Avoid log storm when installing with pgaudit enabled, references #5076

comment:9 by pramsey, 2 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.