473,395 Members | 1,348 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Abort transaction due to error

I have a weird problem.....the database iam handling has huge amount of data....when i run my program on the cursor containing the data i run into the following error: 54000 PROGRAM LIMIT EXCEEDED.
I understand that in a single transaction there are too many queries being executed.I want to know if i can solve this problem by using nested BEGIN...END.
Postgresql does not roolback everything when an error occurs. Is there any way to go about this problem??

Thanks
Sam
Mar 4 '08 #1
6 5858
rski
700 Expert 512MB
Maybe sevepoints would help, see here
http://www.postgresql.org/docs/curre...savepoint.html
Mar 9 '08 #2
ok i tried using save points but it i get the following error:
ERROR: SPI_execute_plan failed executing query "SAVEPOINT my_savepoint": SPI_ERROR_TRANSACTION

Iam using postgresql 8.1. i think postgres verions >8 support savepoints?do they?
And does commit work as a command in postgres?if not what can be a workaround?

Thanks again
Sam
Mar 11 '08 #3
rski
700 Expert 512MB
see here
Maybe you should apply some patch. What 8.1 version do you use
Mar 11 '08 #4
see here
Maybe you should apply some patch. What 8.1 version do you use
sorry i wrote the version as 8.1 earlier.
Iam using version "PostgreSQL 8.2.6 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 (mingw-special)"

Thanks Sam
Mar 12 '08 #5
Also in a procedure when i try writing something like this:
result := test_case1(lane,thePartition);
IF result=1 THEN
PREPARE TRANSACTION 'foo';
PERFORM getandsetimputeddata(thePartition);
COMMIT PREPARED 'foo';
END IF;


i get the following error:
ERROR: SPI_execute_plan failed executing query "PREPARE TRANSACTION 'foo'": SPI_ERROR_TRANSACTION
SQL state: XX000

What does this error mean?iam writing it wrong or some pacth is missing?

Thanks for your time
Sam
Mar 12 '08 #6
Also in a procedure when i try writing something like this:
result := test_case1(lane,thePartition);
IF result=1 THEN
PREPARE TRANSACTION 'foo';
PERFORM getandsetimputeddata(thePartition);
COMMIT PREPARED 'foo';
END IF;


i get the following error:
ERROR: SPI_execute_plan failed executing query "PREPARE TRANSACTION 'foo'": SPI_ERROR_TRANSACTION
SQL state: XX000

What does this error mean?iam writing it wrong or some pacth is missing?

Thanks for your time
Sam


I realised the solution to avoid total rollback of a transaction would be using nested BEGIN......END

Sam
Mar 15 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: TZoner | last post by:
1) Can one find the location of the 'Transaction Log' at: <Hard Disk>\Program Files\Microsoft SQL Server\MSSQL\Data\MyDb_Log.ldf? 2) Is it safe to delete it, as SQL will create a new Transaction...
7
by: Abdul-Wahid Paterson | last post by:
Hi, I have had a site working for the last 2 years and have had no problems until at the weekend I replace my database server with a newer one. The database migration went like a dream and I had...
6
by: J Smith | last post by:
After doing some googling through the lists and such, I wasn't able to arrive at a solution for a problem I've run into recently. I've seen mention of similar symptoms, but my case seems different....
7
by: Morris | last post by:
I want to abort a running thread, so I call MyThread.abort() function. My problem is this thread runs "almost" like a while(true) loop and I don't want the Abort() function interrupts the thread at...
1
by: Ennixo | last post by:
hi, i coded an application in which i can move a slider to define a radius and it computes a gaussian blur in a thread. because the Scroll event of the slider is often raised, i use one thread...
5
by: Bob Altman | last post by:
Hi all, I have a WinForms app that has no main window (just a module with a Sub Main). My Main routine calls a subroutine that wants to politely abort the application rather than return to its...
2
by: Habib | last post by:
CREATE PROCEDURE SimpleInsert ( @custname custname_type, @carname carname_type) AS BEGIN TRANSACTION INSERT Customers (CustName) VALUES (@custname)
4
by: wizard | last post by:
Hello dear friends, I am writing a small program to test transactions in php. But when I try to simulate an error condition during transaction, my php script aborts. It does rollback work, but...
0
by: kuguy | last post by:
Hi all, I'm new to the forums, so I hope this isn't in the wrong place... I have that "Software caused connection abort: socket write error" exception error that i've never meet before. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.