Creating and managing triggers - Mailing list pgsql-general

From Dean Myerson
Subject Creating and managing triggers
Date
Msg-id 50734A9C.2080004@deanmyerson.org
Whole thread Raw
Responses Re: Creating and managing triggers  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
I need to create some triggers and the docs seem pretty straightforward.
When I tried to create one using CREATE TRIGGER, it took over 20
minutes, and the second one hadn't finished over more than an hour. And
I later found that all other database users in the company were locked
out during this process. The table getting the triggers has about 187000
rows in it and is pretty central, so lots of functions join with it.

So the first question is whether it is normal for a Create Trigger
command to take so long. Also, I don't see any commands to examine
existing triggers. They restarted the database server when the second
create trigger hung, so I don't know what happened with it. I didn't
even save the name, obviously a problem on my part. But there should be
some equivalent of Show Trigger, shouldn't there?

Dean


pgsql-general by date:

Previous
From: marian krucina
Date:
Subject: Dump/restore indexes and functions in public schema
Next
From: "Daniel Serodio (lists)"
Date:
Subject: Help estimating database and WAL size