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;