Skip site navigation (1) Skip section navigation (2)

Re: Postgresq 8,1 hangs when running function

From: "ben sewell" <mosherben(at)gmail(dot)com>
To: "Sean Davis" <sdavis2(at)mail(dot)nih(dot)gov>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Postgresq 8,1 hangs when running function
Date: 2006-08-21 11:26:07
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Hi Sean,
what I meant was that when I tried executing my function, postgres wouldn't
return any results and not do anything. CPU Usage would increase to 50% when
I tried executing the function. The funny thing is that CPU usage was at
100% and the sys admin called me up and asked about it. Apparently there
were 10 instances of postgres running so we ended up having to restart
anyways. I have tried to run the function after the restart, but everytime I
do, CPU usage raises to 50% and I have to stop postgres as a serivce to get
CPU usage to 1%.

For the database employees are working with, its an access database running
on the server not my postgres database. The postgres database is supposed to
replace the existing access one once we've got report generation speeded up
which I thought I had done until it was consuming all the resources.

As for a new pc to run postgres on, it's not even worth it this is my last
week of my job. I have learnt alot thoughout my time at the place through. I
just don't get why postgres is hanging considering the hardware that is on
the server, and the Access database is only being used by 2 users so that
wouldn't slow it down much.

I forgot to tell what code I was typing into the command prompt via terminal

select * from reports(18,2,null,null,null.null,null,null,null,null) as
(employee_first_name varchar,employee_surname varchar, data_issued date,
client_first_name varchar,client_middle_names varchar,client_surname
varchar, plantype varchar,plangroup varchar,policy_number
varchar,sum_assured numeric,benefit varchar,premium numeric,brokerage
numeric,comments varchar);


On 8/21/06, Sean Davis <sdavis2(at)mail(dot)nih(dot)gov> wrote:
> On 8/21/06 5:38 AM, "ben sewell" <mosherben(at)gmail(dot)com> wrote:
> > Hi guys,
> > I'm running postgresql 8.1 on a P4 3.0GHz,480 MB RAM, 160GB SCSI hard
> drive
> > on Windows XP. Postgres has been crashing when I have tried testing my
> > reports function, which i leads me to believe it is something in the
> > function because doing normal select statements works fine. Can anyone
> check
> > my code before I ask my boss if I could restart the server, as a restart
> > means 20 mins work lost for employees? Just for reference,
> tblnewbusiness
> > containts just under 8,000 records,
> Hi, Ben.  What do you mean when you say postgres has been "crashing"?
> As for "restarting" the server, you can simply do a restart of postgres,
> which should mean just a second or so of downtime.  You don't need to
> physically reboot the machine.
> As a more important point, if you have employees using the database that
> you
> are working on and you are feeling like you need to restart the server,
> etc., you probably shouldn't be working on that machine.  Instead, buy a
> $700 laptop (or a $350 PC) and install postgres.  Then, dump the database
> from the production machine and load it into your "test" machine.
> Sean

In response to


pgsql-novice by date

Next:From: Sean DavisDate: 2006-08-21 11:41:11
Subject: Re: Postgresq 8,1 hangs when running function
Previous:From: Sean DavisDate: 2006-08-21 10:53:00
Subject: Re: Postgresq 8,1 hangs when running function

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group