Re: [GENERAL]transaction isolation level in plpgsql function
On Fri, Nov 21, 2008 at 1:19 PM, Sergey Moroz [EMAIL PROTECTED] wrote: Is there any way to set transaction isolation level inside plpgsql function? In my case I have no control of transaction before function is started. I don't think there can be any. You are already inside a transaction when plpgsql function is called and there is no way to commit and start new transaction inside plpgsql. Thanks, Pavan -- Pavan Deolasee EnterpriseDB http://www.enterprisedb.com
Re: [GENERAL]transaction isolation level in plpgsql function
whatever calls the function is responsible for transaction level change, because SELECT BLA(); already by default is wrapped by begin;end; - and you can only change transaction level right after BEGIN; although , I feel your pain, it is not possible.
[GENERAL]transaction isolation level in plpgsql function
Is there any way to set transaction isolation level inside plpgsql function? In my case I have no control of transaction before function is started. -- Sincerely, Sergey Moroz
[GENERAL] transaction isolation level
We recently updated our postgres to 8.1.4, since then Ive been getting the following error: [Aug 28, 2006 5:43:16 AM ERROR] org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle of a transaction. at org.postgresql.jdbc2.AbstractJdbc2Connection.setTransactionIsolation(AbstractJdbc2Connection.java:729) at com.evermind._in.setTransactionIsolation(Unknown Source) at com.evermind._in.setTransactionIsolation(Unknown Source) at com.evermind._in.setTransactionIsolation(Unknown Source) Here is an example of the code that does this: Connection con = null; try { DataSource ds = (DataSource) ctx.lookup(jdbc/EncounterEJBDS); con = ds.getConnection(); con.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED); . . . Anybody experienced this or have a fix? __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [GENERAL] transaction isolation level
josh hes. [EMAIL PROTECTED] writes: We recently updated our postgres to 8.1.4, since then Ive been getting the following error: [Aug 28, 2006 5:43:16 AM ERROR] org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle of a transaction. at org.postgresql.jdbc2.AbstractJdbc2Connection.setTransactionIsolation(AbstractJdbc2Connection.java:729) Updated to 8.1.4 from what? You'll probably have better luck asking on the pgsql-jdbc list (and mentioning which jdbc driver versions are involved). This looks to me like it's associated with a change in driver behavior not backend behavior. regards, tom lane ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
Re: [GENERAL] transaction isolation level
My guess would be that you are getting the connection with autocommit (false); Either way try conn = getConn... conn.setAutoCommit(false); conn.changeTransactionLevel On 29-Aug-06, at 9:15 AM, Tom Lane wrote: josh hes. [EMAIL PROTECTED] writes: We recently updated our postgres to 8.1.4, since then I’ve been getting the following error: [Aug 28, 2006 5:43:16 AM ERROR] org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle of a transaction. at org.postgresql.jdbc2.AbstractJdbc2Connection.setTransactionIsolation( AbstractJdbc2Connection.java:729) Updated to 8.1.4 from what? You'll probably have better luck asking on the pgsql-jdbc list (and mentioning which jdbc driver versions are involved). This looks to me like it's associated with a change in driver behavior not backend behavior. regards, tom lane ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
[GENERAL] Transaction Isolation Level
Hello. How is it possible that ResultSetObjInstance in this statement ResultSetObjInstance = PreparedObjInstance.executeQuery() contains this column and value respectively: TRANSACTION ISOLATION LEVEL , READ_COMMITTED ? --- Note: During the query operation, lots of write operations are going simultaneously in the DB. If this is the reason of the not-expected value above, why is it returned and not thrown as exception? Any light on this matter is greatly appreciated. Thank you. Grace ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [GENERAL] Transaction Isolation Level
On Thu, 25 Mar 2004, Grace C. Unson wrote: Hello. How is it possible that ResultSetObjInstance in this statement ResultSetObjInstance = PreparedObjInstance.executeQuery() contains this column and value respectively: TRANSACTION ISOLATION LEVEL , READ_COMMITTED ? --- Note: During the query operation, lots of write operations are going simultaneously in the DB. If this is the reason of the not-expected value above, why is it returned and not thrown as exception? This could be an indication of a thread safety problem in the driver. Are you using multiple threads on the same connection? The only code (other than your own) that could generate that ResultSet would be calling Connection.getTransactionIsolation() do you have any of these calls in your code? What version of the driver are you using? Kris Jurka ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster