Thread: Weird pause when running statements

Weird pause when running statements

From
Grant Quimby
Date:
Hi,

I've done some research and this appears to be a unique problem.

During an ETL process using the 8.3-603 JDBC3 driver with Pentaho Data Integration the transactions and everything
stopsprocessing. No disk access, No process activity, Nothing. The Postgres processes are still present. 

After reloading the server configuration the processes just start off where they stopped and continue normally.
Sometimesthey stop again, the same workaround sets the process running again. However trying to deploy this process to
aserver means that those pauses are unacceptable. This appears to be a problem with the driver and/or the server.
Anybodyhave any suggestions? I'd rather not have to port everything to another DBMS. 

Thanks in advance.

Regards,

Grant Quimby
Consultant
Dialog Information Technology
Ph: +61 2 6209 2600
Fx: +61 2 6209 2602
grant_quimby@dialog.com.au

Re: Weird pause when running statements

From
Oliver Jowett
Date:
Grant Quimby wrote:
> Hi,
>
> I've done some research and this appears to be a unique problem.
>
> During an ETL process using the 8.3-603 JDBC3 driver with Pentaho Data Integration the transactions and everything
stopsprocessing. No disk access, No process activity, Nothing. The Postgres processes are still present. 
>
> After reloading the server configuration the processes just start off where they stopped and continue normally.
Sometimesthey stop again, the same workaround sets the process running again. However trying to deploy this process to
aserver means that those pauses are unacceptable. This appears to be a problem with the driver and/or the server.
Anybodyhave any suggestions? I'd rather not have to port everything to another DBMS. 

First step would be to work out which half is getting stuck. Try a
thread dump on the Java side and a strace on the backend side.

What do you mean by "reloading the server configuration"?

-O

Re: Weird pause when running statements

From
Oliver Jowett
Date:
Grant Quimby wrote:
> From: Oliver Jowett
> <snip>
>> First step would be to work out which half is getting stuck. Try a
>> thread dump on the Java side and a strace on the backend side.
>
> I've checked the Java side with a thread dump. As far as I can tell everything working okay. I've attached it.
>
> As for strace ... It's not connecting to the process for some reason. I'll try and find the server process condition
anotherway. (Any suggestions? ;-) 
>
>> What do you mean by "reloading the server configuration"?
>
> pg_ctl reload (via either the command line or the pgAdmin point and click).

Ok - so on the Java side everything does appear normal, it's just
waiting for a query result.

pg_ctl reload just sends a SIGHUP to the postmaster I believe, so if
that manages to wake things up it does sound like something getting
stuck on the server side rather than a driver issue.

I don't think there's much more the -jdbc list can do for you here if
it's a server-side problem, you might want to ask on -bugs? (They're
likely to want server version & platform info at a minimum)

-O

Re: Weird pause when running statements

From
Grant Quimby
Date:
Thanks for the help. Appreciate it.

All the best.

Grant Q

________________________________________
From: Oliver Jowett [oliver@opencloud.com]
Sent: Wednesday, 6 August 2008 13:01
To: Grant Quimby
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] Weird pause when running statements

Grant Quimby wrote:
> From: Oliver Jowett
> <snip>
>> First step would be to work out which half is getting stuck. Try a
>> thread dump on the Java side and a strace on the backend side.
>
> I've checked the Java side with a thread dump. As far as I can tell everything working okay. I've attached it.
>
> As for strace ... It's not connecting to the process for some reason. I'll try and find the server process condition
anotherway. (Any suggestions? ;-) 
>
>> What do you mean by "reloading the server configuration"?
>
> pg_ctl reload (via either the command line or the pgAdmin point and click).

Ok - so on the Java side everything does appear normal, it's just
waiting for a query result.

pg_ctl reload just sends a SIGHUP to the postmaster I believe, so if
that manages to wake things up it does sound like something getting
stuck on the server side rather than a driver issue.

I don't think there's much more the -jdbc list can do for you here if
it's a server-side problem, you might want to ask on -bugs? (They're
likely to want server version & platform info at a minimum)

-O

Re: Weird pause when running statements

From
Grant Quimby
Date:
From: Oliver Jowett
<snip>
>
>First step would be to work out which half is getting stuck. Try a
>thread dump on the Java side and a strace on the backend side.

I've checked the Java side with a thread dump. As far as I can tell everything working okay. I've attached it.

As for strace ... It's not connecting to the process for some reason. I'll try and find the server process condition
anotherway. (Any suggestions? ;-) 

>
>What do you mean by "reloading the server configuration"?

pg_ctl reload (via either the command line or the pgAdmin point and click).

Thanks,

Grant Q

Attachment

Re: Weird pause when running statements

From
Tom Lane
Date:
Grant Quimby <grant_quimby@dialog.com.au> writes:
> As for strace ... It's not connecting to the process for some reason. I'll try and find the server process condition
anotherway. (Any suggestions? ;-) 

strace should certainly Just Work, unless maybe you aren't running it as
a user with appropriate permissions?  (You'd need to be either the
postgres user or root.)

            regards, tom lane