Re: Statement timeout behavior in extended queries

From: 'Andres Freund' <andres(at)anarazel(dot)de>
To: "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>
Cc: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>, "david(at)fetter(dot)org" <david(at)fetter(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Statement timeout behavior in extended queries
Date: 2017-04-05 01:45:40
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 2017-04-04 16:56:26 -0700, 'Andres Freund' wrote:
> On 2017-04-04 23:52:28 +0000, Tsunakawa, Takayuki wrote:
> > From: Andres Freund [mailto:andres(at)anarazel(dot)de]
> > > Looks to me like npgsql doesn't do that either. None of libpq, pgjdbs and
> > > npgsql doing it seems like some evidence that it's ok.
> >
> > And psqlODBC now uses always libpq.
> >
> > Now time for final decision?
> I'll send an updated patch in a bit, and then will wait till tomorrow to
> push. Giving others a chance to chime in seems fair.

Attached. I did not like that the previous patch had the timeout
handling duplicated in the individual functions, I instead centralized
it into start_xact_command(). Given that it already activated the
timeout in the most common cases, that seems to make more sense to
me. In your version we'd have called enable_statement_timeout() twice
consecutively (which behaviourally is harmless).

What do you think? I've not really tested this with the extended
protocol, so I'd appreciate if you could rerun your test from the
older thread.

- Andres

Attachment Content-Type Size
0001-Rearm-statement_timeout-after-each-executed-query.patch text/x-patch 4.9 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2017-04-05 01:54:26 Re: Statement timeout behavior in extended queries
Previous Message Robert Haas 2017-04-05 01:29:19 Re: partitioned tables and contrib/sepgsql