If your trigger is supposed to change certain fields, you could return OLD instead of NEW if those fields have not been changed by the trigger. You could also check an updated_on timestamp field to verify if the row has already been modified and potentially skip the trigger altogether. Just a couple thoughts to avoid the bloat.
- How to avoid UPDATE performance degradation in a transac... Karl Düüna
- Re: How to avoid UPDATE performance degradation in ... David G. Johnston
- Re: How to avoid UPDATE performance degradation in ... Tom Lane
- Re: How to avoid UPDATE performance degradation... Karl Düüna
- Re: How to avoid UPDATE performance degrada... Michael Lewis
- Re: How to avoid UPDATE performance degradation... Andres Freund