I'm working in a legacy codebase/database. The code previously depended on triggers but at one point stopped using them - the logic was moved into the main (Nodejs) codebase and the CREATE TRIGGER
statements were removed. Nonetheless, the triggers still exist in the DB. I can see them searching the pg_trigger
table:
As far as I can tell they're still enabled which is weird because to my knowledge they shouldn't be doing anything. If they're not being used I'd like to remove them. My questions:
There is no way to do that, unless you modify the triggers to record the execution somewhere.
Perhaps session_replication_role
is set to replica
. Then normal triggers ( tgenabled = 'O'
) don't fire.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.