NeonN
Neon2y ago
2 replies
sacred-emerald

Neon Console SQL Editor: ERROR: cannot execute XYZ in a read-only transaction

I haven't touched my Neon project for a few weeks and apparently there's a new bug now in Neon Console's SQL Editor: I'm unable to execute any query that requires write access. I have two compute instances assigned to my main branch, one RW compute that auto-suspends, and one RO compute that's always on. Although I selected the RW compute in the SQL Editor, I always get an error when I try to execute a write query.

E.g. when I try to comment on my DB:

COMMENT ON DATABASE "rdb" IS 'blabla';


I get

ERROR: cannot execute COMMENT in a read-only transaction (SQLSTATE 25006)


This happens regardless whether the RW compute is currently idle or active. And it is reproducible – I just created a completely fresh project with the same setup (1 RW, 1 RO compute) and I run into the same issue!

I suspect this bug is related to the new time travel feature. Note that the time travel toggle was off during the above!

Addendum: Apparently, the compute selection drop-down in the SQL Editor is broken. When I suspend the RO compute (status: idle) and start the RW compute (status: active), write queries work again – regardless of which compute is selected in the drop-down. 😑
Was this page helpful?