pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Viorel Dragomir <bc@vio.ro>
To: pgsql-sql@postgresql.org
Subject: Re: transactions
Date: Tue, 29 Jul 2003 12:28:13 -0700
Message-ID: <200307291228.13273.josh@agliodbs.com> (raw)
In-Reply-To: <031a01c355fd$4f52d020$0600a8c0@fix.ro>
References: <031a01c355fd$4f52d020$0600a8c0@fix.ro>

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



view thread (4+ messages)

Message-ID: <200307291228.13273.josh@agliodbs.com>
Permalink:  ../200307291228.13273.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200307291228.13273.josh@agliodbs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: josh@agliodbs.com, bc@vio.ro
  Subject: Re: transactions
  In-Reply-To: <200307291228.13273.josh@agliodbs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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