pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedsetQueryTimout()
7+ messages / 4 participants
[nested] [flat]
* setQueryTimout()
@ 2010-09-28 00:29 knircky <knircky@gmail.com>
0 siblings, 2 replies; 7+ messages in thread
From: knircky @ 2010-09-28 00:29 UTC (permalink / raw)
To: pgsql-jdbc
I am trying to connect to my postgres db via MashZone (www.mashzone.com) and
getting the following error message:
The following error occurred when running SQL query "SELECT * FROM
GT.GameTypeDescription;" on database "HM_postgres": Method
org.postgresql.jdbc4.Jdbc4Statement.setQueryTimeout(int) is not yet
implemented.
Since i do not have control over how mashzone communicates with postgres, (i
am simply a user of a product that communicates with the DBMS), i need to
find a JDBC driver that either implements this functionality or catches and
ignores the exception.
I have been unable to find anything so far.
Does anybody have any idea how to solve this dilemma?
--
View this message in context: http://postgresql.1045698.n5.nabble.com/setQueryTimout-tp2856086p2856086.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: setQueryTimout()
@ 2010-09-28 04:05 Samuel Gendler <sgendler@ideasculptor.com>
parent: knircky <knircky@gmail.com>
1 sibling, 1 reply; 7+ messages in thread
From: Samuel Gendler @ 2010-09-28 04:05 UTC (permalink / raw)
To: knircky <knircky@gmail.com>; +Cc: pgsql-jdbc
On Mon, Sep 27, 2010 at 5:29 PM, knircky <knircky@gmail.com> wrote:
>
> I am trying to connect to my postgres db via MashZone (www.mashzone.com)
> and
> getting the following error message:
>
> The following error occurred when running SQL query "SELECT * FROM
> GT.GameTypeDescription;" on database "HM_postgres": Method
> org.postgresql.jdbc4.Jdbc4Statement.setQueryTimeout(int) is not yet
> implemented.
>
> [snip]
>
> Does anybody have any idea how to solve this dilemma?
>
>
There may well be a much simpler way, but it is really easy to both read and
build the jdbc driver code. It can't possibly be much work to find where
that exception is being thrown and just return instead. What the side
effects of doing so may be on the product is another question entirely.
Don't write long running queries and it shouldn't be a problem, though ;-)
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: setQueryTimout()
@ 2010-09-28 04:07 Samuel Gendler <sgendler@ideasculptor.com>
parent: Samuel Gendler <sgendler@ideasculptor.com>
0 siblings, 2 replies; 7+ messages in thread
From: Samuel Gendler @ 2010-09-28 04:07 UTC (permalink / raw)
To: knircky <knircky@gmail.com>; +Cc: pgsql-jdbc
On Mon, Sep 27, 2010 at 9:05 PM, Samuel Gendler
<sgendler@ideasculptor.com>wrote:
>
>>
> There may well be a much simpler way, but it is really easy to both read
> and build the jdbc driver code. It can't possibly be much work to find
> where that exception is being thrown and just return instead. What the side
> effects of doing so may be on the product is another question entirely.
> Don't write long running queries and it shouldn't be a problem, though ;-)
>
>
I also wouldn't be surprised to find out that it is possible to modify
mashzone's config in a manner which prevents the call to setQueryTimeout in
the first place. Try explicitly setting the timeout to 0 or -1 or some
other value that may imply infinity
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: setQueryTimout()
@ 2010-09-28 04:27 knircky <knircky@gmail.com>
parent: Samuel Gendler <sgendler@ideasculptor.com>
1 sibling, 0 replies; 7+ messages in thread
From: knircky @ 2010-09-28 04:27 UTC (permalink / raw)
To: pgsql-jdbc
Unfortunately the Query timeout can only be configured via the GUI with 4
possible values ranging from 10-120sec.
I have posted my problem into the MashZone community as well. MashZone has
not been tested with Postgres according to release notes, only with DB2,
ORA, MS and MySQL
http://www.ariscommunity.com/users/knircky/2010-09-27-mashzone-postgres-method-orgpostgresqljdbc4jdb...
--
View this message in context: http://postgresql.1045698.n5.nabble.com/setQueryTimout-tp2856086p2856225.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: setQueryTimout()
@ 2010-09-28 04:28 knircky <knircky@gmail.com>
parent: Samuel Gendler <sgendler@ideasculptor.com>
1 sibling, 0 replies; 7+ messages in thread
From: knircky @ 2010-09-28 04:28 UTC (permalink / raw)
To: pgsql-jdbc
unfortunate this is not in my power.....
--
View this message in context: http://postgresql.1045698.n5.nabble.com/setQueryTimout-tp2856086p2856227.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: setQueryTimout()
@ 2010-09-29 08:25 rsmogura@softperience.pl
parent: knircky <knircky@gmail.com>
1 sibling, 0 replies; 7+ messages in thread
From: rsmogura@softperience.pl @ 2010-09-29 08:25 UTC (permalink / raw)
To: knircky <knircky@gmail.com>; +Cc: pgsql-jdbc
On Mon, 27 Sep 2010 17:29:13 -0700 (PDT), knircky <knircky@gmail.com>
wrote:
> The following error occurred when running SQL query "SELECT * FROM
> GT.GameTypeDescription;" on database "HM_postgres": Method
> org.postgresql.jdbc4.Jdbc4Statement.setQueryTimeout(int) is not yet
> implemented.
I posted at the end of 2009 a patch for query timeout implementation on
server side (as we extensively use PostgreSQL)
(http://archives.postgresql.org/pgsql-jdbc/2009-11/msg00010.php), you can
download it and try patching - I will review a code once again, but you can
check, using supplied tests, that this works and what is most important
terminates (!) deadlocked statements.
Kind regards,
Radosław Smogura
http://www.softperience.eu
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: setQueryTimout()
@ 2010-09-29 08:52 Radosław Smogura <rsmogura@softperience.eu>
0 siblings, 0 replies; 7+ messages in thread
From: Radosław Smogura @ 2010-09-29 08:52 UTC (permalink / raw)
To: knircky <knircky@gmail.com>; +Cc: pgsql-jdbc
On Mon, 27 Sep 2010 17:29:13 -0700 (PDT), knircky <knircky@gmail.com>
wrote:
> The following error occurred when running SQL query "SELECT * FROM
> GT.GameTypeDescription;" on database "HM_postgres": Method
> org.postgresql.jdbc4.Jdbc4Statement.setQueryTimeout(int) is not yet
> implemented.
I posted at the end of 2009 a patch for query timeout implementation on
server side (as we extensively use PostgreSQL)
(http://archives.postgresql.org/pgsql-jdbc/2009-11/msg00010.php), you can
download it and try patching - I will review a code once again, but you
can
check, using supplied tests, that this works and what is most important
terminates (!) deadlocked statements.
Kind regards,
Radosław Smogura
http://www.softperience.eu
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2010-09-29 08:52 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-09-28 00:29 setQueryTimout() knircky <knircky@gmail.com>
2010-09-28 04:05 ` Samuel Gendler <sgendler@ideasculptor.com>
2010-09-28 04:07 ` Samuel Gendler <sgendler@ideasculptor.com>
2010-09-28 04:27 ` knircky <knircky@gmail.com>
2010-09-28 04:28 ` knircky <knircky@gmail.com>
2010-09-29 08:25 ` rsmogura@softperience.pl
2010-09-29 08:52 Re: setQueryTimout() Radosław Smogura <rsmogura@softperience.eu>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox