| From: | maksim <m(dot)milyutin(at)postgrespro(dot)ru> | 
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org | 
| Subject: | Fwd: [BUG] Print timing statistics of trigger execution under turned off timing option of EXPLAIN ANALYZE | 
| Date: | 2016-08-12 11:47:06 | 
| Message-ID: | 081c0540-ecaa-bd29-3fd2-6358f3b359a9@postgrespro.ru | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
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
| Attachment | Content-Type | Size | 
|---|---|---|
| trigger_timing.patch | text/x-patch | 1.1 KB | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alexander Korotkov | 2016-08-12 12:15:58 | Relocation of tuple between release and re-acquire of tuple lock | 
| Previous Message | Aleksander Alekseev | 2016-08-12 10:18:55 | Re: [Patch] New psql prompt substitution %r (m = master, r = replica) |