fix: don't throw errors on COPY_BOTH results
This change only allows to execute a `START_REPLICATION` command on a
suitable configured database, i.e. the following commands would work:
conn = psycopg.connect(DSN, replication="database", autocommit=True)
conn.execute(
"""
START_REPLICATION SLOT "my_replication_slot"
LOGICAL 0/0 (proto_version '1',publication_names 'my_publication')
""")
<psycopg.Cursor [COPY_BOTH] [ACTIVE] at 0x...>
instead of gettgin an error such as "COPY cannot be used with this method".
Please check https://github.com/psycopg/psycopg/issues/71#issuecomment-
3393722855
for the description of the db configuration required to make this command work.
No further support for logical replication is planned at this moment, but this
change allows to play with replication without needing to go down at libpq
level to execute replication commands.