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

Re: Hot Standby query cancellation and Streaming Replication integration

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Hot Standby query cancellation and Streaming Replication integration
Date: 2010-02-27 20:31:06
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

> If you think of it in those terms, the idea that "you need to run PITR
> backup/archive recovery" to not get that behavior isn't an important
> distinction anymore.  If you run SR with the option enabled you could
> get it, any other setup and you won't.


I always expected that we'd get this kind of behavior with "synch" in
9.1.  I can see that there are two desired modes of behaviour depending
on what the replication config is:

1) Master full-speed, degraded operation on slaves: this is the current
wal_standby_delay approach.  It has the advantage of supporting possibly
hundreds of slaves, and certainly dozens.

2) Master burdened, full operation on slaves:  this is the
publish-xmin-back-to-master approach, which IIRC the core team first
discussed at pgCon 2008 before Simon started work, and which you and Tom
seem to think can be done soon.

I can see people wanting to use either mode depending on their use-case.
 Or, for that matter, using both modes to different slaves.

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?

Also, I'm serious about what I suggested earlier for "delay" mode.  We
should have an option for cancelled queries to be immediately retried,
if that's feasible.  It would turn something which is now a major
application design issue (lots of cancelled queries) into just degrated

Overall, though, I'd say that getting 9.0 out the door relatively
on-time is more important than getting it perfect.  "Release early,
release often" isn't just a mantra; it's a very good idea if you want
your project to keep improving and not bog down and fall apart.

--Josh Berkus

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2010-02-27 20:50:23
Subject: Re: NaN/Inf fix for ECPG
Previous:From: Bruce MomjianDate: 2010-02-27 20:30:21
Subject: Re: Anyone know if Alvaro is OK?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group