Database Reference
In-Depth Information
12. Createthe recovery.conf configurationfileinthestandbyclusterdirectory
by executing the following command:
> notepad standby\recovery.conf
13. Enter the followingin the recovery.conf configuration file:
standby_mode = 'on'
primary_conninfo = 'port=5433
user=postgres'
restore_command = 'copy
"C:\\postgis_cookbook\\db\\standby\\archive\\%f"
"%p"'
14. StartPostgreSQLonthestandbydatabaseclusterbyexecutingthefollowing
command:
> pg_ctl start -D standby -l
standby\postgres.log
15. Run some simple tests to make sure the replication is working.
16. Createthe test databaseandthe test tableontheprimarydatabaseserv-
er by executing the following commands:
> psql -p 5433 -d postgres
postgres=# CREATE DATABASE test;
postgres=# \c test
test=# CREATE TABLE test AS SELECT 1 AS
id, 'one'::text AS value;
17. Connect to the standby database server by executing the following com-
mand:
> psql -p 5434 -d postgres
18. See if the test database is present by executing the following commands:
postgres=# \l
Search WWH ::




Custom Search