What is postgresql doing for "statement: commit;begin;"

Started by Nick Burchabout 21 years ago3 messagesgeneral
Jump to latest
#1Nick Burch
nick@torchbox.com

Hi All

I've turned on slow query reporting via log_min_duration_statement, and
I've been looking through the log files.

Quite a lot, I'm seeing lines like:
2005-01-17 13:11:15 LOG: duration: 4688.108 ms statement: commit;begin;

Is there any way to find out what exactly got executed here?

Thanks
Nick

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Nick Burch (#1)
Re: What is postgresql doing for "statement: commit;begin;"

Nick Burch <nick@torchbox.com> writes:

Quite a lot, I'm seeing lines like:
2005-01-17 13:11:15 LOG: duration: 4688.108 ms statement: commit;begin;

Is there any way to find out what exactly got executed here?

A whole lot of deferred-until-transaction-commit operations, evidently.
You got any deferred foreign keys in this database?

regards, tom lane

#3Nick Burch
nick@torchbox.com
In reply to: Tom Lane (#2)
Re: What is postgresql doing for "statement: commit;begin;"

On Mon, 17 Jan 2005, Tom Lane wrote:

Nick Burch <nick@torchbox.com> writes:

Quite a lot, I'm seeing lines like:
2005-01-17 13:11:15 LOG: duration: 4688.108 ms statement: commit;begin;

Is there any way to find out what exactly got executed here?

A whole lot of deferred-until-transaction-commit operations, evidently.
You got any deferred foreign keys in this database?

No, we don't. Because of this, I did some reading and discovered
"log_statement" and "log_pid", and turned them on.

It appears that ColdFusion is wrapping some of it's internal housekeeping
DB calls in transactions, and these are the ones that then show up as the
long running "statement: commit;begin;" entries. Mystery solved.

Thanks
Nick