pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedTransactions
4+ messages / 4 participants
[nested] [flat]
* Transactions
@ 2000-07-28 08:21 Carolyn Lu Wong <carolyn@kss.net.au>
2000-07-28 23:06 ` Re: Transactions John McKown <jmckown@prodigy.net>
0 siblings, 1 reply; 4+ messages in thread
From: Carolyn Lu Wong @ 2000-07-28 08:21 UTC (permalink / raw)
To: pgsql-sql
Does postgreSQL support nested transactions?
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Transactions
2000-07-28 08:21 Transactions Carolyn Lu Wong <carolyn@kss.net.au>
@ 2000-07-28 23:06 ` John McKown <jmckown@prodigy.net>
0 siblings, 0 replies; 4+ messages in thread
From: John McKown @ 2000-07-28 23:06 UTC (permalink / raw)
To: Carolyn Lu Wong <carolyn@kss.net.au>; +Cc: pgsql-sql
On Fri, 28 Jul 2000, Carolyn Lu Wong wrote:
> Does postgreSQL support nested transactions?
>
no.
^ permalink raw reply [nested|flat] 4+ messages in thread
* transactions
@ 2003-07-29 18:14 Viorel Dragomir <bc@vio.ro>
2003-07-29 19:28 ` Re: transactions Josh Berkus <josh@agliodbs.com>
0 siblings, 1 reply; 4+ messages in thread
From: Viorel Dragomir @ 2003-07-29 18:14 UTC (permalink / raw)
To: pgsql-sql
Is there any known issues regarding transactions.
I got something like:
begin transaction
select function1()
select into v1 function2()
if v1='ok' then commit else rollback end if
To notice that both functions have about 100 lines of code.
And both functions uses the same tables but in different modes.
function1 deletes && function2 inserts
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 hope tomorrow I'll resolv this and if is primary my fault I just shut up and say nothing.
regards,
vioss
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: transactions
2003-07-29 18:14 transactions Viorel Dragomir <bc@vio.ro>
@ 2003-07-29 19:28 ` Josh Berkus <josh@agliodbs.com>
0 siblings, 0 replies; 4+ messages in thread
From: Josh Berkus @ 2003-07-29 19:28 UTC (permalink / raw)
To: Viorel Dragomir <bc@vio.ro>; 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
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2003-07-29 19:28 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-07-28 08:21 Transactions Carolyn Lu Wong <carolyn@kss.net.au>
2000-07-28 23:06 ` John McKown <jmckown@prodigy.net>
2003-07-29 18:14 transactions Viorel Dragomir <bc@vio.ro>
2003-07-29 19:28 ` Re: transactions Josh Berkus <josh@agliodbs.com>
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