This seems like a bad use of a stored procedure. Why wouldn't you spin up
40 clients with a table name and run it across 40 connections? But also, I
don't like loops in stored procedures. Working with loops in a set based
system hurts me but it's personal preference.
Like, I could write this in py
gogala.mla...@gmail.com schrieb am 19.10.2022 um 01:46:
Amazon, lead by Kevin Closson, the guy who has famously designed
Oracle Exadata among other things, even came up with the recipe how
to migrate it to Postgres:
https://aws.amazon.com/blogs/database/migrating-oracle-autonomous-transactions-t
It seems that I made a thread-discipline error when I asked a question that had
nothing to do with the frequency, or the cost, of committing when I saw this
reply (paraphrased for brevity here) from Christophe:
> You [cannot] commit in [a] BEGIN / END [block statement] that has an
> exception h
On 10/19/22 08:06, Mladen Gogala wrote:
[snip]
Applications do this kind of thing all the time, very successfully; it
was just that the loop was in the application rather than in the procedure.
High commit rates happen all the time, and they don't break PostgreSQL.
For example, an IoT app
Comments in-line.
On Tue, 2022-10-18 at 21:02 -0700, Christophe Pettus wrote:
>
>
> > On Oct 18, 2022, at 19:18, gogala.mla...@gmail.com wrote:
> >
> > Commit within a loop is an extremely bad idea.
>
> This is an over-generalization. There are many use-cases for this
> (if there were not, pr
> On Oct 18, 2022, at 19:18, gogala.mla...@gmail.com wrote:
>
> Commit within a loop is an extremely bad idea.
This is an over-generalization. There are many use-cases for this (if there
were not, procedures wouldn't have been nearly as important a feature).
For example, if you are processi
On Tue, 2022-10-18 at 14:31 -0700, Christophe Pettus wrote:
>
> Rather than have a loop inside the BEGIN / END, you could put the
> BEGIN EXCEPTION END inside the loop, catch the error, store the
> important parts of the exception in a variable, and then do the
> COMMIT after the END statement but
On Tue, 2022-10-18 at 17:33 -0400, Tom Lane wrote:
> Bryn Llewellyn writes:
> > x...@thebuild.com wrote:
> > > You can commit in a loop, but not in BEGIN / END block that has
> > > an exception handler: that creates a subtransaction for the
> > > duration of the BEGIN / END.
>
> > This surprised
On Tue, 2022-10-18 at 17:33 -0400, Tom Lane wrote:
> Bryn Llewellyn writes:
> > x...@thebuild.com wrote:
> > > You can commit in a loop, but not in BEGIN / END block that has an
> > > exception handler: that creates a subtransaction for the duration of the
> > > BEGIN / END.
>
> > This surprise
> On Oct 18, 2022, at 14:15, Bryn Llewellyn wrote:
> Could the limitation be lifted by making tractable internal implementation
> changes? Or is it rooted in profoundly deep features of the
> architecture—meaning that it could never be lifted?
That is a very good question. One of the issues
Bryn Llewellyn writes:
> x...@thebuild.com wrote:
>> You can commit in a loop, but not in BEGIN / END block that has an exception
>> handler: that creates a subtransaction for the duration of the BEGIN / END.
> This surprised me when I first started to use PG (after all those years
> with ORCL).
> On Oct 18, 2022, at 14:29, Ravi Krishna wrote:
>
> > You can commit in a loop, but not in BEGIN / END block that has an
> > exception handler:
> > that creates a subtransaction for the duration of the BEGIN / END.
>
> The reason I have to deal with error exception is that I want to ignore
> You can commit in a loop, but not in BEGIN / END block that has an exception
> handler:> that creates a subtransaction for the duration of the BEGIN / END.
The reason I have to deal with error exception is that I want to ignore failure
on a table and move on to next table.
I thought I can tric
> x...@thebuild.com wrote:
>
>> s_ravikris...@aol.com wrote:
>>
>> I am getting error at COMMIT -> cannot commit while a subtransaction is
>> active...
>
> You can commit in a loop, but not in BEGIN / END block that has an exception
> handler: that creates a subtransaction for the duration of
> On Oct 18, 2022, at 13:14, Ravi Krishna wrote:
>
> I am getting error at COMMIT -> cannot commit while a subtransaction is
> active.
> Is commit not possible in a loop
You can commit in a loop, but not in BEGIN / END block that has an exception
handler: that creates a subtransaction for t
15 matches
Mail list logo