diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2016-08-14 19:57:29 +0100 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2016-08-14 19:57:29 +0100 |
commit | e0883f19677140ec03288034f1bf5e43f941990b (patch) | |
tree | a6523625322ab8c3643dfca10bb2dfb051908ce8 | |
parent | e5390fed983a18bc6a3cf0479cf026ebcddc17b6 (diff) | |
download | psycopg2-e0883f19677140ec03288034f1bf5e43f941990b.tar.gz |
Name the db in the replication test like the unit test one
-rw-r--r-- | doc/src/advanced.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/src/advanced.rst b/doc/src/advanced.rst index 258aec9..5b5fb35 100644 --- a/doc/src/advanced.rst +++ b/doc/src/advanced.rst @@ -547,7 +547,7 @@ Make sure that replication connections are permitted for user ``postgres`` in ``pg_hba.conf`` and reload the server configuration. You also need to set ``wal_level=logical`` and ``max_wal_senders``, ``max_replication_slots`` to value greater than zero in ``postgresql.conf`` (these changes require a server -restart). Create a database ``psycopg2test``. +restart). Create a database ``psycopg2_test``. Then run the following code to quickly try the replication support out. This is not production code -- it has no error handling, it sends feedback too @@ -559,7 +559,7 @@ replication:: import psycopg2 import psycopg2.extras - conn = psycopg2.connect('dbname=psycopg2test user=postgres', + conn = psycopg2.connect('dbname=psycopg2_test user=postgres', connection_factory=psycopg2.extras.LogicalReplicationConnection) cur = conn.cursor() try: @@ -589,7 +589,7 @@ replication:: "until the slot is dropped.", file=sys.stderr) -You can now make changes to the ``psycopg2test`` database using a normal +You can now make changes to the ``psycopg2_test`` database using a normal psycopg2 session, ``psql``, etc. and see the logical decoding stream printed by this demo client. |