Re: [HACKERS] Transaction is read-only in auto commit mode

2006-09-28 Thread Albe Laurenz
Chattopadhyay asked:
 My application based on Java servlets was running fine with 
 version PostgreSQL 7.x, but started giving error: 
 transaction is read-only, in version 8.0 and 8.1. I am 
 using Suse Linux 9.3/PostgreSQL 8.0 or Suse Linux 
 10.1/PostgreSQL 8.1. I am using JDBC 3 drivers and all 
 connections are in auto-commit mode. Could you please tell me 
 what's going wrong.
[...]
 I'd really appreciate if anyone could suggest a pointer for 
 further investigation, if not an outright solution.

Via JDBC, ask the database to

SHOW default_transaction_read_only

and look at the output.
If that is 'true', look at

SELECT source FROM pg_settings WHERE
name='default_transaction_read_only'

If it is false, check java.sql.Connection.isReadOnly().
It is 'false' by default, but maybe is changed somewhere in your code.

Yours,
Laurenz Albe

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


[HACKERS] Transaction is read-only in auto commit mode

2006-09-27 Thread Asok Chattopadhyay
Hi,My application based on Java servlets was running fine with version PostgreSQL 7.x, but started giving error: "transaction is read-only", in version 8.0 and 8.1. I am using Suse Linux 9.3/PostgreSQL 8.0 or Suse Linux 10.1/PostgreSQL 8.1. I am using JDBC 3 drivers and all connections are in auto-commit mode. Could you please tell me what's going wrong. Strangely, I looked through all the postings in all the forums but could not find a mention of this problem. Am I doing something exttremely stupid orhas something changed in version 8 onwards that's causing this problem? The error appears sporadically, not always but quite frequently. I am using the standard postgresql.conf, except that I had increased the shared buffers and working memory sizes.I'd really appreciate if anyone could suggest a pointer for further investigation, if not an outright solution.Thanks
 in advance..Asok