From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | John R Pierce <pierce(at)hogranch(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: savepoints in 8.3.7 or whatever... |
Date: | 2009-07-15 18:15:24 |
Message-ID: | 20090715181524.GL4551@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
John R Pierce wrote:
> we have an app thats doing massive amounts of inserts, batched in
> transactions, multiple concurrent connections (tuned for optimal
> throughput, usually around 1 thread per cpu core plus a couple more).
> occasionally a transaction gets duplicated, and that causes a constraint
> violation which causes the whole transaction to abort unless we wrap
> each insert in a savepoint.
>
> my developers are asking me if there are limits as to how many
> savepoints can be active, etc. they have run into various such limits
> in oracle.
There's a hard limit of 2^32 savepoints in a transaction, but you'll
probably run into limits before that due to memory constraints (I think
each savepoint will use at least 8kB). Anyway I suggest you do RELEASE
SAVEPOINT after each insert to ensure resources are released as best as
possible.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
From | Date | Subject | |
---|---|---|---|
Next Message | Bill Moran | 2009-07-15 18:25:42 | Re: change database |
Previous Message | Jeff Davis | 2009-07-15 18:13:57 | Re: change database |