pgsql 报错 in a read-only transaction

PG cannot execute some dml, ddl statement time report: in a read-only transaction

This situation may be caused by the following reasons:

1 A main/standby switch may have occurred: check /data/pg_hba.conf

  SELECT pg_is_in_recovery(); standby machine returns T

2 show default_transaction_read_only to see if the parameter value is ON

DB级别:
alter database xxxxx set default_transaction_read_only = off;

System level:

alter system set default_transaction_read_only=off;

Guess you like

Origin blog.51cto.com/2012ivan/2605440