"Ed L." <pgsql@bluepolka.net> writes: > I think I'm seeing table-level lock contention in the following function I think you're barking up the wrong tree entirely. There's nothing in that function that would acquire a conflicting table lock. I'm wondering about foreign key lock contention, myself. Look to what the DELETE must do. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org