> On Wed, Feb 22, 2017 at 11:50:44AM +0900, Tatsuo Ishii wrote: >> Last year I have proposed an enhancement regarding behavior of the >> statement timeout in extended queries. >> >> https://www.postgresql.org/message-id/20160528.220442.1489791680347556026.t-ishii%40sraoss.co.jp >> >> IMO the current behavior is counter intuitive and I would like to >> change it toward PostgreSQL 10.0. >> >> For example, suppose that the timeout is set to 4 seconds and the >> first query takes 2 seconds and the second query takes 3 seconds. Then >> the statement timeout is triggered if a sync message is sent to >> backend after the second query. >> >> Moreover, log_duration or log_min_duration_statement shows that each >> query took 2 or 3 seconds of course, which is not very consistent with >> the statement timeout IMO. >> >> Attached patch tries to change the behavior, by checking statement >> timeout against each phase of an extended query. >> >> To test the patch, I have created a small tool called "pgproto", which >> can issue arbitrary sequence of frontend/backend message, reading from a >> text file. >> >> https://github.com/tatsuo-ishii/pgproto >> (to build the program, you need C compiler and libpq) > > Does it seem reasonable to start making this into a regression test > and/or fuzz test for the protocol itself?
I personally think the regression tests ought to include tests for extended query protocols and pgproto could be an useful tool to implement that. Of course if we are going for that direction, pgproto needs to be a contrib module first. Best regards, -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sraoss.co.jp/index_en.php Japanese:http://www.sraoss.co.jp -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers