SequelizeDatabaseError: cannot execute UPDATE in a read-only transaction I'm currently using Sequelize, NodeJS and PostgreSQL. I have users who update their accounts password on first login. Well, today I had this error appear after 3-4 successful logins. 

What does this even mean? I did nothing out of the ordinary. A google search does not help me at all as they dont seem to have my problem. 

This error appeared on this query:

UPDATE "Users" 
SET "password"='-hash-',
"verificationCode"=0,
"startedOn"='2018-04-03 20:45:31.801 +00:00',
"emailVerified"=true,
"updatedAt"='2018-04-03 20:45:31.802 +00:00' 
WHERE "userId" = 84


Any help?
It can be caused by these reasons

1) you connected to a follower. Check it, using select pg_is_in_recovery(); – on master, it will return false:

test=# select pg_is_in_recovery();
 pg_is_in_recovery
-------------------
 f
(1 row)


Of course, you can run UPDATEs only on the master DB.

2) (I suppose this is not your case, but just for completeness I add it) You're working with master DB, but transaction or session was set to be "read only":

set session characteristics as transaction read only; 


or, inside transaction where UPDATE is being executed:

set transaction read only;