Re: Avoid long-running transactions in a long-runningstored procedure?

Поиск
Список
Период
Сортировка
От David Crane
Тема Re: Avoid long-running transactions in a long-runningstored procedure?
Дата
Msg-id 41ED0E73B2268F4D9E4081FAB5ED05FD04420FD0@midas.utopiasystems.net
обсуждение исходный текст
Ответ на Re: Avoid long-running transactions in a long-running stored procedure?  (Ow Mun Heng <Ow.Mun.Heng@wdc.com>)
Список pgsql-performance
Thanks for the prompt replies!

It sounds like these are variations of the same approach.  In our case,
we need to do a lot of comparing against the old data, audit tables and
so forth, so the bulk of the work is in the body of the existing loop
(already coded).  So I think keeping that loop body in a stand-alone
stored procedure will be the most efficient for us.  And we'll port the
logic outside the loop into a java program, easier for us to schedule
through another existing system.

Those autonomous transactions are gonna be nice, but PostgreSQL is
plenty nice as it is.  Progress is good, though.

Thanks,
David Crane

-----Original Message-----
From: Ow Mun Heng [mailto:Ow.Mun.Heng@wdc.com]
Sent: Thursday, February 14, 2008 8:31 PM
To: josh@agliodbs.com
Cc: pgsql-performance@postgresql.org; David Crane
Subject: Re: [PERFORM] Avoid long-running transactions in a
long-runningstored procedure?


On Thu, 2008-02-14 at 17:29 -0800, Josh Berkus wrote:
> 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.
> 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.
>

I actually do it externally via a perl script even, and I'm breaking the
data down to even more than miniscule size.

В списке pgsql-performance по дате отправления:

Предыдущее
От: Ow Mun Heng
Дата:
Сообщение: Re: Avoid long-running transactions in a long-running stored procedure?
Следующее
От: Peter Schuller
Дата:
Сообщение: shared_buffers in 8.3 w/ lots of RAM on dedicated PG machine