PostgreSQl-cannot execute nextval() in a read-only transaction

Issue: ERROR: cannot execute nextval() in a read-only transaction

Solution: Go >> C:\Program Files\PostgreSQL\11\share, open postgresql.conf and replaced default_transaction_read_only to off as `default_transaction_read_only = off` Also here: C:\Program Files\PostgreSQL\11\data, open postgresql.conf and replaced default_transaction_read_only to off as `default_transaction_read_only = off` In command line: ALTER SYSTEM SET default_transaction_read_only = off; See the result: Select name, setting from pg_settings where name ='default_transation_read_only' --------------------------------------------------------------------- user=# SET SESSION CHARACTERISTICS AS TRANSACTION READ ONLY; SET user=# SHOW transaction_read_only; transaction_read_only ----------------------- on (1 row)