-
-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
psycopg2.OperationalError: PQexec not allowed during COPY BOTH when running drop_replication_slot #1456
Comments
Were you able to resolve it? I am having the same issues with dropping a slot. |
I'm having same problem |
Are you people using the same connection to run queries? I understand postgres doesn't like it and you must use a separate connection which is not interested by the replication. Or am I not understanding correctly? |
I have a single connection and that is only for replication I am not running other queries with that |
Ah ok, so it's the internal query to |
I should do it with another connection? |
I am not familiar with the replication stack, but I think that you should stop the generator before being able to run any command on the same connection. You can try stopping the generator, or drop the slot from another connection, but the latter seems more brutal. |
I am having the same problem. In my case the query connection and the replication connection are different. |
This is a bug tracker
Please complete the following information:
Describe the bug
We are trying logical replication on a Postgres RDS, and are running a docker image on ECS to consume the wal2json data. We have a timeout condition to drop the replication slot, before exiting the process, so that we don't run out of storage on the RDS. We tried using cur.consume_stream previously, and we saw that eventually the image would be running for some time without printing anything, and storage on the RDS would explode.
When running
cur.drop_replication_slot('wal2json_test_slot')
We get
The slot does seem to drop successfully, so I don't know why we get this error in our logs.
The script:
The text was updated successfully, but these errors were encountered: