From: Josh Berkus <josh@agliodbs.com>
To: pgsql-performance@postgresql.org
Cc: David Crane <davidc@donorschoose.org>
Subject: Re: Avoid long-running transactions in a long-running stored procedure?
Date: Thu, 14 Feb 2008 17:29:18 -0800
Message-ID: <200802141729.18657.josh@agliodbs.com> (raw)
In-Reply-To: <41ED0E73B2268F4D9E4081FAB5ED05FD04420FC7@midas.utopiasystems.net>
References: <41ED0E73B2268F4D9E4081FAB5ED05FD04420FC7@midas.utopiasystems.net>
David,
> Once per quarter, we need to load a lot of data, which causes many
> updates across the database. We have an online transaction
> processing-style application, which we really want to stay up during the
> update job.
What you're talking about is "autonomous transactions". There's someone
working on them for 8.4, and we may get them next version, but you can't
have them now.
However, you can write your stored procedures in an external language (like
PL/Perl, PL/Ruby, PL/Java or PL/Python) and re-connect to your database in
order to run several separate transactions. Several users are doing this
for large ETL jobs.
--
--Josh
Josh Berkus
PostgreSQL @ Sun
San Francisco
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-performance@postgresql.org
Cc: josh@agliodbs.com, davidc@donorschoose.org
Subject: Re: Avoid long-running transactions in a long-running stored procedure?
In-Reply-To: <200802141729.18657.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