pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mauri Sahlberg <Mauri.Sahlberg@claymountain.com>
To: 'pgsql-admin@postgresql.org' <pgsql-admin@postgresql.org>
Subject: Procedures, triggers and transactions...
Date: Sun, 25 Jan 2004 22:21:02 +0200
Message-ID: <1075062062.3217.29.camel@fault> (raw)

Hi,

After a long period of developing we have managed to conceive several
huge procedures that take forever to run and make up absolutely too
large transactions. 

The framework is that a c++ application transforms xml-input data to
sql-procedure calls with appropriate parameters who in turn call another
procedures who in turn call another procedures... And as all procedures
are run in the transaction of the outermost select (in this case the c++
application's select that called the initial procedure) we have huge
problems with concurrency. There of course can be any number of
instances of that c++-application running.

We tried another approach that propagates calculation and invocations of
other procedures through triggers but this probably will not help us
either as all procedures are still in the same transaction and no locks
will be released until the outermost select that caused the chain has
ended?

Our current working hypothesis is to build a procedure that writes
procedure calls to a table and then let the c++-application to go
through that table and call the necessary procedures one by one - each
procedure in it's own transaction.

Any comments or suggestions? 

Regards,
-- 
Mauri Sahlberg <Mauri.Sahlberg@claymountain.com>
Claymountain Solutions Oy




view thread (3+ messages)  latest in thread

Message-ID: <1075062062.3217.29.camel@fault>
Permalink:  ../1075062062.3217.29.camel@fault/
Also on:    postgresql.org/message-id/1075062062.3217.29.camel@fault

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: Mauri.Sahlberg@claymountain.com
  Subject: Re: Procedures, triggers and transactions...
  In-Reply-To: <1075062062.3217.29.camel@fault>
  References: <1075062062.3217.29.camel@fault>

* 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