Re: Statement timeout behavior in extended queries

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
Cc: tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com, david(at)fetter(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Statement timeout behavior in extended queries
Date: 2017-04-04 23:38:53
Message-ID: 20170404233853.mwj6li7mirjb6mep@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2017-04-04 16:10:32 +0900, Tatsuo Ishii wrote:
> >> If what Tatsuo-san said to Tom is correct (i.e. each Parse/Bind/Execute starts and stops the timer), then it's a concern and the patch should not be ready for committer. However, the current patch is not like that -- it seems to do what others in this thread are expecting.
> >
> > Oh, interesting - I kind of took the author's statement as, uh,
> > authoritative ;). A quick look over the patch confirms your
> > understanding.
>
> Yes, Tsunakawa-san is correct. Sorry for confusion.
>
> > I think the code needs a few clarifying comments around this, but
> > otherwise seems good. Not restarting the timeout in those cases
> > obviously isn't entirely "perfect"/"correct", but a tradeoff - the
> > comments should note that.
> >
> > Tatsuo-san, do you want to change those, and push? I can otherwise.
>
> Andres,
>
> If you don't mind, could you please fix the comments and push it.

Hm. I started to edit it, but I'm halfway coming back to my previous
view that this isn't necessarily ready.

If a client were to to prepare a large number of prepared statements
(i.e. a lot of parse messages), this'll only start the timeout once, at
the first statement sent. It's not an issue for libpq which sends a
sync message after each PQprepare, nor does it look to be an issue for
pgjdbc based on a quick look.

Does anybody think there might be a driver out there that sends a bunch
of 'parse' messages, without syncs?

- Andres

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2017-04-04 23:42:08 Re: Statement timeout behavior in extended queries
Previous Message Tatsuo Ishii 2017-04-04 23:34:43 Re: Statement timeout behavior in extended queries