From 5c07d12c2e546324e31bbc2876083d26162dc94e Mon Sep 17 00:00:00 2001 From: Ray Jacobson Date: Tue, 7 Oct 2025 23:59:13 -0700 Subject: [PATCH] Add comment --- ddl/functions/notify_on_row.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ddl/functions/notify_on_row.sql b/ddl/functions/notify_on_row.sql index 1458cd63..7f5ccfff 100644 --- a/ddl/functions/notify_on_row.sql +++ b/ddl/functions/notify_on_row.sql @@ -18,6 +18,9 @@ end; $$ language plpgsql; -- register trigger for an insert / update on the following tables +-- WARNING: Be EXTREMELY careful when touching this because it requires a large number of locks to run. +-- If you add a table, it is very recommended to run it manually first and babysit it (canceling any blocking queries that show up). +-- Creating the trigger is fast, but it can easily deadlock the database. do $$ declare tbl text; @@ -41,4 +44,4 @@ begin EXECUTE 'drop trigger if exists trg_' ||tbl|| ' on ' ||tbl|| ';'; EXECUTE 'create trigger trg_' ||tbl|| ' after insert or update on ' ||tbl|| ' for each row execute procedure on_new_row();'; end loop; -end $$; \ No newline at end of file +end $$;