Steps to setup demo
===================

* Setup a primary/standy pair as normal, and make sure that pgbench
  has been installed in the the PATH

* Sample postgresql.conf parameters known to demonstrate the problem case
  and show the log entries below are::

  archive_mode = on
  archive_command = '<appropriate for your system>' 
  archive_timeout = 30
  recovery_connections = on
  max_standby_delay = 0
  vacuum_defer_cleanup_age = 0
  log_min_messages = debug2

* Install this hs-demo file set on master and standby
* On the master, run "setup" to create a pgbench data set
* Wait for the standby to catch up with all activity related to creating
  the database, to where pg_standby is running but idle because there
  are no new WAL segments appearing
* On the standby, run "selecter".  This will loop forever, doing 1 minute
  of selecting activity on each loop
* On the master, run "updater".  This runs for 10 seconds, then flushes
  all the activity it created to the master.

What you should see is that the long-running queries on the standby are
regularly cancelled.  Entries like this will appear in the log files on the standby:

LOG:  restored log file "0000000100000000000000A5" from archive
ERROR:  canceling statement due to conflict with recovery
DETAIL:  User query might have needed to see row versions that must be removed.
STATEMENT:  SELECT sum(abalance) FROM pgbench_accounts;

