Skip site navigation (1) Skip section navigation (2)

Re: statement_timeout and crosstab

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Tiago D(dot) Jacobs - iMDT" <tiago(at)imdt(dot)com(dot)br>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: statement_timeout and crosstab
Date: 2008-05-10 20:57:48
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
"Tiago D. Jacobs - iMDT" <tiago(at)imdt(dot)com(dot)br> writes:
> ( 5 ) Here's the problem (it returns without breaking by timeout):

Hm, works fine here:

ERROR:  canceling statement due to statement timeout
CONTEXT:  SQL statement "SELECT i.item_name::text As row_name, 
to_char(if.action_date, 'mon')::text As bucket,
        SUM(if.num_used)::integer As bucketvalue
    FROM inventory As i INNER JOIN inventory_flow As if
        ON i.item_id = if.item_id
      AND action_date BETWEEN date '2007-01-01' and date '2007-12-31 
    GROUP BY i.item_name, to_char(if.action_date, 'mon'), 
date_part('month', if.action_date)
    ORDER BY i.item_name"

How long does the query run on your machine?  If it's less than 10ms,
maybe what you're seeing is just that the resolution of
statement_timeout isn't necessarily less than 10ms, depending on

What is the platform, anyway?  And what Postgres version?

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Andriy RysinDate: 2008-05-11 17:25:24
Subject: BUG #4158: client encoding is wrong in plpythonu code
Previous:From: Tiago D. Jacobs - iMDTDate: 2008-05-10 19:52:01
Subject: Re: statement_timeout and crosstab

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group