Re: pgsql: Add pg_audit, an auditing extension
От | Fujii Masao |
---|---|
Тема | Re: pgsql: Add pg_audit, an auditing extension |
Дата | |
Msg-id | CAHGQGwE0XfGJPL6NUjaPcO6sZyiXEE4eCBR96XYkzL-N0mD8uA@mail.gmail.com обсуждение исходный текст |
Ответ на | pgsql: Add pg_audit, an auditing extension (Stephen Frost <sfrost@snowman.net>) |
Ответы |
Re: pgsql: Add pg_audit, an auditing extension
(Stephen Frost <sfrost@snowman.net>)
Re: pgsql: Add pg_audit, an auditing extension (Stephen Frost <sfrost@snowman.net>) |
Список | pgsql-committers |
On Thu, May 14, 2015 at 11:36 PM, Stephen Frost <sfrost@snowman.net> wrote: > Add pg_audit, an auditing extension > > This extension provides detailed logging classes, ability to control > logging at a per-object level, and includes fully-qualified object > names for logged statements (DML and DDL) in independent fields of the > log output. > > Authors: Ian Barwick, Abhijit Menon-Sen, David Steele > Reviews by: Robert Haas, Tatsuo Ishii, Sawada Masahiko, Fujii Masao, > Simon Riggs > > Discussion with: Josh Berkus, Jaime Casanova, Peter Eisentraut, > David Fetter, Yeb Havinga, Alvaro Herrera, Petr Jelinek, Tom Lane, > MauMau, Bruce Momjian, Jim Nasby, Michael Paquier, > Fabrízio de Royes Mello, Neil Tiffin > > Branch > ------ > master > > Details > ------- > http://git.postgresql.org/pg/commitdiff/ac52bb0442f79076b14acd8ad5b696946c1053b8 > > Modified Files > -------------- > contrib/Makefile | 1 + > contrib/pg_audit/.gitignore | 5 + > contrib/pg_audit/Makefile | 21 + > contrib/pg_audit/expected/pg_audit.out | 964 ++++++++++++++++ > contrib/pg_audit/pg_audit--1.0.0.sql | 22 + > contrib/pg_audit/pg_audit.c | 1870 ++++++++++++++++++++++++++++++++ > contrib/pg_audit/pg_audit.conf | 1 + > contrib/pg_audit/pg_audit.control | 5 + > contrib/pg_audit/sql/pg_audit.sql | 617 +++++++++++ > doc/src/sgml/contrib.sgml | 1 + > doc/src/sgml/filelist.sgml | 1 + > doc/src/sgml/pgaudit.sgml | 678 ++++++++++++ > 12 files changed, 4186 insertions(+) pg_audit uses 1.0.0 as its version number. But, is the third digit really required? Why? We usually uses the version number with two digits in contrib modules. CREATE EXTENSION pg_audit failed with the following error message when shared_preload_libraries and pg_audit.log are set to pg_audit and ddl, respectively. =# create extension pg_audit ; ERROR: pg_event_trigger_ddl_commands() can only be called in an event trigger function CONTEXT: SQL statement "SELECT UPPER(object_type), object_identity FROM pg_event_trigger_ddl_commands()" In Makefile, PGFILEDESC should be added. +# pg_audit/Makefile should be "# contrib/pg_audit/Makefile" for the consistency. The categories of some SQL commands are different between log_statement and pg_audit. For example, REINDEX is treated as DDL in pg_audit, but not in log_statement. That's confusing. We should use the same "category-mapping" rule as much as possible. Regards, -- Fujii Masao
В списке pgsql-committers по дате отправления: