cannot execute DELETE in a read-only transaction

Hi, I'm trying to delete an entry through a database function when the user calls this function, but I always get this error.

I already checked select pg_is_in_recovery(); and show default_transaction_read_only;.
I also tried to set set transaction read write; but then I'll get this error: set transaction read write;.

Please help
Was this page helpful?