Laurenz Albe offers up some thoughts:
Sometimes one of our customers looks at the most time consuming statements in a database (either with
pg_stat_statements
or with pgBadger) and findsCOMMIT
in the high ranks. Normally,COMMIT
is a very fast statement in PostgreSQL, so that is worth investigating. In this article, I will explore the possible reasons for a slowCOMMIT
and discuss what you can do about it.
Read on for those reasons.