"Marc G. Fournier" <scrappy@postgresql.org> writes:
> 'k, does this help any?
> TopMemoryContext: 40960 total in 4 blocks; 8632 free (10 chunks); 32328 used
> SPI Plan: 3072 total in 2 blocks; 1728 free (0 chunks); 1344 used
> TopTransactionContext: 534765568 total in 74 blocks; 2144 free (68 chunks); 534763424 used
Yeah, the leak is clearly in TopTransactionContext. That doesn't let
the trigger code off the hook though, because the pending-triggers list
is kept there. Are you *sure* there are no AFTER triggers here?
(Don't forget foreign-key checking triggers.)
regards, tom lane