Re: Transaction is read-only in auto commit mode

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: Transaction is read-only in auto commit mode
Дата
Msg-id 52EF20B2E3209443BC37736D00C3C1380A94C1EB@EXADV1.host.magwien.gv.at
обсуждение исходный текст
Ответ на Transaction is read-only in auto commit mode  (Asok Chattopadhyay <asok@dreamapps.com>)
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: tomas@tuxteam.de
Дата:
Сообщение: Re: String Similarity
Следующее
От: tomas@tuxteam.de
Дата:
Сообщение: Re: Can i see server SQL commands ?