Unix Technical Forum

statement stuck when the connection grew up to 45 or more

This is a discussion on statement stuck when the connection grew up to 45 or more within the pgsql Bugs forums, part of the PostgreSQL category; --> Hi, I'm using Postgresql 8.1.3. Recently I facing one problem, when the connection for postgresql grow up to 45 ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 10:01 AM
kah_hang_ang@toray.com.my
 
Posts: n/a
Default statement stuck when the connection grew up to 45 or more





Hi,

I'm using Postgresql 8.1.3.

Recently I facing one problem, when the connection for postgresql grow up
to 45 or more, when I trigger a statement from WebApp
this statement will stuck forever.
I try to kill this transaction and then trigger the same statement again
but it still the same.
But this time I leave the transaction there and try to kill other
connections that is not in use.
It's weird that after I kill around 5-10 unused connections, the statement
start to run and finish.

Could anyone give me some idea how could this be?
Is it a bug of PostgreSQL?

This is the statement which having problem:
select count(distinct empno) as counter1 from pay_master_history
where empno in (select empno from pay_batch_basic_history where
organizationid like '015003%')
and processyear = '2006'
and processmonth = '05'
and processbatch = '1'

Thanks!


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 10:01 AM
Qingqing Zhou
 
Posts: n/a
Default Re: statement stuck when the connection grew up to 45 or more


<kah_hang_ang@toray.com.my> wrote
>
> Recently I facing one problem, when the connection for postgresql grow
> up
> to 45 or more, when I trigger a statement from WebApp
> this statement will stuck forever.
> I try to kill this transaction and then trigger the same statement
> again
> but it still the same.
> But this time I leave the transaction there and try to kill other
> connections that is not in use.
> It's weird that after I kill around 5-10 unused connections, the
> statement
> start to run and finish.
>


I can hardly believe that's Postgres's problem. Are you sure the query
was processing by the server? Try to do:

ps -auxw|grep postgres

to see if you can see the query was stuck there.

Regards,
Qingqing


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 10:01 AM
Stefan van Aalst
 
Posts: n/a
Default Infinite increment of postgre.exe in taskmanager

Hi

Newbie when it comes down to postgre.

OS: Windows XP SP2 Pro Dutch

When I run a DMS (Xinco) that uses postgre (I only use postgre for this), a
service is started. Xinco uses a separate limited Xinco User account.

After starting the service I see several postgre.exe services running of
various sizes. That's fine.

After an hour or so I see several postgre.exe services running (up to 200
and still increasing) and it is the postgre.exe 76kb that is in that huge
number (even when nobody uses Xinco, it still continous).

When I stop the PostgreSQL service then the large kb postgre.exe disappears
from the task manager ...but all those 76kb postgre.exe remain in memory.

Any ideas?

Stefan


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-10-2008, 10:01 AM
Jan Cruz
 
Posts: n/a
Default Re: statement stuck when the connection grew up to 45 or more

This is the statement which having problem:
select count(distinct empno) as counter1 from pay_master_history
where empno in (select empno from pay_batch_basic_history where
organizationid like '015003%')
and processyear = '2006'
and processmonth = '05'
and processbatch = '1'

SELECT COUNT (*) FROM (
SELECT empno as counter1 from pay_master_history as a
INNER JOIN (select empno from pay_batch_basic_history where organizationid
like '015003%' and processyear = '2006'
and processmonth = '05'
and processbatch = '1') as b
ON b.empno = a.empno ) as count_result
-----------------------------
or just create the view and use inner join then count :b

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:45 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com