meteor/postgres-packages

Meteor leaks postgres triggers on subscribed tables

aweis opened this issue · 1 comments

aweis commented

I noticed that after killing the meteor server a bunch, I can cause there to be many leftover stale triggers left on the subscribed tables.

numtel mentioned this on his meteor-pg README (https://github.com/numtel/meteor-pg) and gave a potential solution. Look at "Closing connections between hot code-pushes".

todos=# \d lists
                                             Table "public.lists"
   Column   |           Type           |                               Modifiers
------------+--------------------------+-----------------------------------------------------------------------
 id         | integer                  | not null default nextval('lists_id_seq'::regclass)
 created_at | timestamp with time zone | not null default now()
 user_id    | integer                  |
 name       | character varying(255)   | not null default ('List '::text || currval('lists_id_seq'::regclass))
Indexes:
    "lists_pkey" PRIMARY KEY, btree (id)
Triggers:
    simple_pg_4vt4_lists AFTER INSERT OR DELETE OR UPDATE ON lists FOR EACH ROW EXECUTE PROCEDURE livequery_simple_pg_4vt4()
    simple_pg_9mw7_lists AFTER INSERT OR DELETE OR UPDATE ON lists FOR EACH ROW EXECUTE PROCEDURE livequery_simple_pg_9mw7()
    "simple_pg_EiJh_lists" AFTER INSERT OR DELETE OR UPDATE ON lists FOR EACH ROW EXECUTE PROCEDURE "livequery_simple_pg_EiJh"()
    "simple_pg_F27H_lists" AFTER INSERT OR DELETE OR UPDATE ON lists FOR EACH ROW EXECUTE PROCEDURE "livequery_simple_pg_F27H"()
    "simple_pg_fD3Y_lists" AFTER INSERT OR DELETE OR UPDATE ON lists FOR EACH ROW EXECUTE PROCEDURE "livequery_simple_pg_fD3Y"()
    "simple_pg_jWni_lists" AFTER INSERT OR DELETE OR UPDATE ON lists FOR EACH ROW EXECUTE PROCEDURE "livequery_simple_pg_jWni"()
    "simple_pg_kg6H_lists" AFTER INSERT OR DELETE OR UPDATE ON lists FOR EACH ROW EXECUTE PROCEDURE "livequery_simple_pg_kg6H"()
    "simple_pg_ncWS_lists" AFTER INSERT OR DELETE OR UPDATE ON lists FOR EACH ROW EXECUTE PROCEDURE "livequery_simple_pg_ncWS"()
    simple_pg_xwvk_lists AFTER INSERT OR DELETE OR UPDATE ON lists FOR EACH ROW EXECUTE PROCEDURE livequery_simple_pg_xwvk()
aweis commented

I noticed that there was already an issue about this:
#34