Can connect to AWS aurora via psql, but cannot insert

Asked 2 years ago, Updated 2 years ago, 61 views

I would like to install only the postgresql client on Amazon Linux and connect to Aurora for use.Aurora is postgresql.

 psql-host-database-U username

You can also connect and select from the .However, when I try to insert, I get the following error:

ERROR:cannot execute INSERT in a read-only transaction

We have verified that the destination DB can be written separately from the Windows GUI client.
Do I need to set any settings for psql?
What I want to do is to insert the data by loading the file with psql in batches.

aws postgresql

2022-09-30 19:38

1 Answers

The message "ERROR: cannot execute INSERT in a read-only transaction" means
"SET TRANSACTION READ ONLY…" and other settings are set to make the transaction read-only.

Insert writes (add) data, so it is clear that it is not a read.
I don't think it's possible to do that in a transaction that's set to read-only.


2022-09-30 19:38

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.