Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: Hot Standby query cancellation and Streaming Replication integration


  • From: Bruce Momjian <bruce(at)momjian(dot)us>
  • To: Greg Smith <greg(at)2ndquadrant(dot)com>
  • Cc: Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
  • Subject: Re: Hot Standby query cancellation and Streaming Replication integration
  • Date: Sat, 27 Feb 2010 21:14:28 -0500 (EST)
  • Message-id: <201002280214.o1S2ES717980@momjian.us> <text/plain>

Greg Smith wrote:
> Josh Berkus wrote:
> 
> > Now that I think about it, the xmin thing really doesn't seem
> > conceptually difficult.  If the slave just opens a 2nd, special query
> > connection back to the master and publishes its oldest xmin there, as
> > far as the master is concerned, it's just another query backend.
> > Could it be that easy?
> >   
> 
> Something just like that is in fact already suggested as a workaround in 
> the Hot Standby manual:
> 
> "The first option is to connect to the primary server and keep a query 
> active for as long as needed to run queries on the standby. This 
> guarantees that a WAL cleanup record is never generated and query 
> conflicts do not occur, as described above. This could be done using 
> contrib/dblink  and pg_sleep(), or via other mechanisms."

I am unclear how you would easily advance the snapshot as each query
completes on the slave.

-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  PG East:  http://www.enterprisedb.com/community/nav-pg-east-2010.do



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group