Re: transactions - Mailing list pgsql-sql

From Josh Berkus
Subject Re: transactions
Date
Msg-id 200307291228.13273.josh@agliodbs.com
Whole thread Raw
In response to transactions  ("Viorel Dragomir" <bc@vio.ro>)
List pgsql-sql
Viorel,

> The problem is that my web browser hangs on this query and stays that way a
> lot [like 30 minutes -- i forgot about it and after 30 minutes it was still
> trying to open the result page]

I think this is a problem inside one of the functions; either you have an 
endless loop, or you are doing a huge unindexed join operation or something 
similar.   Enclosing the two functions inside a transaction by itself 
shouldn't cause a time-out.

One thing that can mess things up vis-a-vis transactions:

If you have a function which does a series of large cascading updates -- that 
is, the function uses the updated table from step #2 to perform step #3, and 
step #3 to do step #4, and each update is 1000's of rows -- then execution 
can really bog down due to the lack of VACUUMing between updates.   However, 
you can't VACUUM without committing the transaction.

Just in case, I'd suggest doing a VACUUM ANALYZE right before running your big 
transaction.

-- 
Josh Berkus
Aglio Database Solutions
San Francisco


pgsql-sql by date:

Previous
From: "Viorel Dragomir"
Date:
Subject: transactions
Next
From: ww zz
Date:
Subject: Unsubscribe