Fwd: [BUG] Print timing statistics of trigger execution under turned off timing option of EXPLAIN ANALYZE

Started by Maksim Milyutinover 9 years ago2 messageshackers
Jump to latest
#1Maksim Milyutin
m.milyutin@postgrespro.ru

Hello, hackers!

At this moment EXPLAIN ANALYZE with turned off timing option after
execution query that expires trigger prints time of total execution of
trigger function:

postgres=# EXPLAIN (ANALYZE, timing false) insert INTO foo
values(1000001, '');
QUERY PLAN
--------------------------------------------------------------------------
Insert on foo (cost=0.00..0.01 rows=1 width=36) (actual rows=0 loops=1)
-> Result (cost=0.00..0.01 rows=1 width=36) (actual rows=1 loops=1)
Planning time: 0.038 ms
Trigger unique_foo_c1:*/time=0.000/* calls=1
Execution time: 340.766 ms
(5 rows)

My patch fixes this problem.

--
Maksim Milyutin
Postgres Professional:http://www.postgrespro.com
Russian Postgres Company

Attachments:

trigger_timing.patchtext/x-patch; name=trigger_timing.patchDownload+7-3
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Maksim Milyutin (#1)
Re: Fwd: [BUG] Print timing statistics of trigger execution under turned off timing option of EXPLAIN ANALYZE

maksim <m.milyutin@postgrespro.ru> writes:

postgres=# EXPLAIN (ANALYZE, timing false) insert INTO foo
values(1000001, '');
QUERY PLAN
--------------------------------------------------------------------------
Insert on foo (cost=0.00..0.01 rows=1 width=36) (actual rows=0 loops=1)
-> Result (cost=0.00..0.01 rows=1 width=36) (actual rows=1 loops=1)
Planning time: 0.038 ms
Trigger unique_foo_c1:*/time=0.000/* calls=1
Execution time: 340.766 ms
(5 rows)

Hmm, yeah, it shouldn't do that.

My patch fixes this problem.

Will push, thanks.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers