Re: [GENERAL] Detecting uncommitted changes

2011-12-28 Thread Thomas Kellerer
Tom Lane wrote on 28.12.2011 01:41: Thomas Kellererspam_ea...@gmx.net writes: Tom Lane wrote on 27.12.2011 20:22: More specifically, look to see if the current transaction has assigned itself a transaction ID. I think the easiest place to see this is in pg_locks --- it will be holding

[GENERAL] Detecting uncommitted changes

2011-12-27 Thread Thomas Kellerer
Hi, is there a way I can detect if the current session has any uncommitted changes? I'm not trying to find uncommitted changes from other sessions (connections) only for the *current* one. I thought there was a discussion on the mailing list that involved the txid_XXX functions, but I

Re: [GENERAL] Detecting uncommitted changes

2011-12-27 Thread Bill Moran
In response to Thomas Kellerer spam_ea...@gmx.net: Hi, is there a way I can detect if the current session has any uncommitted changes? I'm not trying to find uncommitted changes from other sessions (connections) only for the *current* one. I thought there was a discussion on the

Re: [GENERAL] Detecting uncommitted changes

2011-12-27 Thread Thomas Kellerer
Bill Moran wrote on 27.12.2011 19:37: is there a way I can detect if the current session has any uncommitted changes? I'm not trying to find uncommitted changes from other sessions (connections) only for the *current* one. I thought there was a discussion on the mailing list that involved the

Re: [GENERAL] Detecting uncommitted changes

2011-12-27 Thread Tom Lane
Thomas Kellerer spam_ea...@gmx.net writes: Bill Moran wrote on 27.12.2011 19:37: is there a way I can detect if the current session has any uncommitted changes? If I'm understanding you correctly, you could just make it check the transaction status. If there's an active transaction, then

Re: [GENERAL] Detecting uncommitted changes

2011-12-27 Thread Thomas Kellerer
Tom Lane wrote on 27.12.2011 20:22: If I'm understanding you correctly, you could just make it check the transaction status. If there's an active transaction, then there are uncommitted changes. Sounds like what I want, but how do I check the transaction status (I'm using JDBC) More

Re: [GENERAL] Detecting uncommitted changes

2011-12-27 Thread Tom Lane
Thomas Kellerer spam_ea...@gmx.net writes: Tom Lane wrote on 27.12.2011 20:22: More specifically, look to see if the current transaction has assigned itself a transaction ID. I think the easiest place to see this is in pg_locks --- it will be holding exclusive lock on a TransactionId object