New Event Trigger: table_rewrite - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject New Event Trigger: table_rewrite
Date
Msg-id m238aqwgj5.fsf@2ndQuadrant.fr
Whole thread Raw
Responses Re: New Event Trigger: table_rewrite
List pgsql-hackers
Hi fellow hackers,

Please find attached to this email a patch to implement a new Event
Trigger, fired on the the "table_rewrite" event. As attached, it's meant
as a discussion enabler and only supports ALTER TABLE (and maybe not in
all forms of it). It will need to grow support for VACUUM FULL and
CLUSTER and more before getting commited.

Also, I'd like to work on the AccessExclusiveLock Event Trigger next,
but wanted this one, more simple, to get acceptance as the way to
approach adding events that are not DDL centric.

This time it's not about which command is running, it's about what the
command is doing.

 src/backend/commands/event_trigger.c        | 92 ++++++++++++++++++++-
 src/backend/commands/tablecmds.c            | 35 +++++++-
 src/backend/utils/cache/evtcache.c          |  2 +
 src/include/commands/event_trigger.h        |  1 +
 src/include/utils/evtcache.h                |  3 +-
 src/test/regress/expected/event_trigger.out | 18 ++++
 src/test/regress/sql/event_trigger.sql      | 21 +++++
 7 files changed, 166 insertions(+), 6 deletions(-)

Regards,
--
Dimitri Fontaine                                        06 63 07 10 78
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support


Attachment

pgsql-hackers by date:

Previous
From: Abhijit Menon-Sen
Date:
Subject: Re: pgaudit - an auditing extension for PostgreSQL
Next
From: Andres Freund
Date:
Subject: Re: WIP: dynahash replacement for buffer table