pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedAbort() doesn't abort backends which are in WAITING state
3+ messages / 3 participants
[nested] [flat]
* Abort() doesn't abort backends which are in WAITING state
@ 2017-11-20 15:05 Sudalai <sudalait2@gmail.com>
2017-11-20 18:11 ` Re: Abort() doesn't abort backends which are in WAITING state rob stone <floriparob@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Sudalai @ 2017-11-20 15:05 UTC (permalink / raw)
To: pgsql-jdbc
Dear geeks,
When we try to abort backend process which are in "WAITING STATE" via
java.sql.Connection.abort(), socket in application server was closed, but
backend process doesn't get aborted.
Backends get aborted only after it resources for which it waited.
Is there anyway we can abort those backend immediately?
We are using database version : 9.5.1, 9.4.0. Driver version : 42.1.4 JDBC
42.
Thanks in advance.
-
Sudalai
-----
sudalai
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-jdbc-f2168246.html
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Abort() doesn't abort backends which are in WAITING state
2017-11-20 15:05 Abort() doesn't abort backends which are in WAITING state Sudalai <sudalait2@gmail.com>
@ 2017-11-20 18:11 ` rob stone <floriparob@gmail.com>
2017-11-20 21:42 ` Re: Abort() doesn't abort backends which are in WAITING state Jorge Solórzano <jorsol@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: rob stone @ 2017-11-20 18:11 UTC (permalink / raw)
To: Sudalai <sudalait2@gmail.com>; pgsql-jdbc
On Mon, 2017-11-20 at 08:05 -0700, Sudalai wrote:
> Dear geeks,
>
> When we try to abort backend process which are in "WAITING STATE" via
> java.sql.Connection.abort(), socket in application server was closed,
> but
> backend process doesn't get aborted.
> Backends get aborted only after it resources for which it waited.
>
> Is there anyway we can abort those backend immediately?
>
> We are using database version : 9.5.1, 9.4.0. Driver version :
> 42.1.4 JDBC
> 42.
>
> Thanks in advance.
>
> -
> Sudalai
>
>
>
> -----
> sudalai
> --
> Sent from: http://www.postgresql-archive.org/PostgreSQL-jdbc-f2168246
> .html
>
Hi Sudalai,
I'm not a "geek" -- just giving my two cents worth.
java.sql.Connection.abort(Executor executor) may throw a SQLException
or a SecurityException.
Are either of these exceptions being thrown?
Are you closing the connection prior to trying the abort?
HTH,
Robert
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Abort() doesn't abort backends which are in WAITING state
2017-11-20 15:05 Abort() doesn't abort backends which are in WAITING state Sudalai <sudalait2@gmail.com>
2017-11-20 18:11 ` Re: Abort() doesn't abort backends which are in WAITING state rob stone <floriparob@gmail.com>
@ 2017-11-20 21:42 ` Jorge Solórzano <jorsol@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Jorge Solórzano @ 2017-11-20 21:42 UTC (permalink / raw)
To: rob stone <floriparob@gmail.com>; +Cc: Sudalai <sudalait2@gmail.com>; pgsql-jdbc
Hi Sudalai,
It looks that is a bug, or actually an incomplete implementation.
The java.sql.Connection.abort(Executor) should do this:
>
> Terminates an open connection. Calling abort results in:
>
> - The connection marked as closed
> - Closes any physical connection to the database
> - Releases resources used by the connection
> - Insures that any thread that is currently accessing the connection
> will either progress to completion or throw an SQLException.
>
>
But the current implementation looks that only mark the connection as
closed at network level:
https://github.com/pgjdbc/pgjdbc/blob/279fb435b392114c45266ecef901bfd59470842a/pgjdbc/src/main/java/...
Jorge Solórzano
On Mon, Nov 20, 2017 at 12:11 PM, rob stone <floriparob@gmail.com> wrote:
>
>
> On Mon, 2017-11-20 at 08:05 -0700, Sudalai wrote:
> > Dear geeks,
> >
> > When we try to abort backend process which are in "WAITING STATE" via
> > java.sql.Connection.abort(), socket in application server was closed,
> > but
> > backend process doesn't get aborted.
> > Backends get aborted only after it resources for which it waited.
> >
> > Is there anyway we can abort those backend immediately?
> >
> > We are using database version : 9.5.1, 9.4.0. Driver version :
> > 42.1.4 JDBC
> > 42.
> >
> > Thanks in advance.
> >
> > -
> > Sudalai
> >
> >
> >
> > -----
> > sudalai
> > --
> > Sent from: http://www.postgresql-archive.org/PostgreSQL-jdbc-f2168246
> > .html
> >
>
>
>
> Hi Sudalai,
>
> I'm not a "geek" -- just giving my two cents worth.
>
> java.sql.Connection.abort(Executor executor) may throw a SQLException
> or a SecurityException.
> Are either of these exceptions being thrown?
>
> Are you closing the connection prior to trying the abort?
>
> HTH,
> Robert
>
>
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2017-11-20 21:42 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-11-20 15:05 Abort() doesn't abort backends which are in WAITING state Sudalai <sudalait2@gmail.com>
2017-11-20 18:11 ` rob stone <floriparob@gmail.com>
2017-11-20 21:42 ` Jorge Solórzano <jorsol@gmail.com>
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