You are here

Using pgAdmin to Watch Transactions

Subscribe to Syndicate
Replication is a feature of postgres and is automatically set up for cloud venues. Self service venues may set this up if they wish - the support team is unable to help you.

Alternatives

Data replicates from the main server to the Hot Standby immediately. If there is a change to the main database, it should appear in the hot standby immediately after that.

One way to verify changes is to have the box office sell a ticket to a patron using Theatre Manager. Before the sale, there should be no transaction history for that order; after the sale, there should be some ticket transactions.

Perform this test daily or weekly to make sure that the database is replicating.

Occasionally, if you take the standby down for maintenance, it may get a bit behind. In that case, you may not see changes until the archive files have been fully recovered and you may need to look at the standby server's Postgres log files for progress. The archives are created periodically as per the frequency that you set in the archive_timeout parameter)

Verifying Simultaneous Activity on Both Servers

Follow these steps to see that data is being migrated:

  1. Start pgAdmin on the main server, point to the main database and start an SQL session
  2. Start pgAdmin on the Hot Standby server, point to the standby database (it is a different IP address) and start an SQL session
  3. On both machines, enter the SQL below into pgAdmin to verify the last 10 transactions

    select * from f_transaction order by t_seq desc limit 10
  4. Log in to Theatre Manager on any workstation (or have anybody sell a ticket)
  5. in pgAdmin on the MAIN database, rerun the SQL above. There should now be a new login transaction or transactions that match the number of tickets sold.
  6. In pgAdmin on the Hot Standby database, rerun the SQL above.
    • There should be the same transactions visible on the hot standby right away.
    • That means the servers have replicated the data.
  7. In Theatre Manager, release the tickets or log out.
  8. in pgAdmin on the MAIN database, rerun the SQL above. There should now be MORE transactions representing your activity.
  9. In pgAdmin on the Hot Standby database, rerun the SQL above.
    • You should see the new transactions on the standby server, meaning the servers have again replicated the data.