"Hot standby"?

Started by Peter Eisentrautover 16 years ago37 messageshackers
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

What is "hot" and "standby" about the proposed "hot standby" feature?

The way I understand these terms in a replication/cluster scenario are:

cold - If the first node dies, you need to start the replacement node from a
standing start.

warm - If the first node dies, the replacement node needs to do some work to
get ready, but it's a lot quicker than "cold".

hot - If the first node dies, the replacement node can take over immediately.

standby - While the master node is running, the standby node instance cannot
be used for anything (useful).

slave - While the master node is running, the slave node can be used in
limited capacity (typically read-only).

master - Both/all nodes have equivalent capabilities all the time while the
cluster is up.

For example, I'd say that a DRBD-based solution would be a cold standby.
Among WAL-based solutions, what we have now with pg_standby (nomen est omen),
is a warmish standby. From what I understand, Simon's patch set does not
change the "warm" property of this arrangement at all. It only changes the
"standby" to a "slave".

Am I off? What other definition of terms justifies the description of "hot
standby"?

#2Robert Haas
robertmhaas@gmail.com
In reply to: Peter Eisentraut (#1)
Re: "Hot standby"?

On Tue, Aug 11, 2009 at 5:30 AM, Peter Eisentraut<peter_e@gmx.net> wrote:

What is "hot" and "standby" about the proposed "hot standby" feature?

Absolutely nothing. It's horribly misnamed.

I have also long argued that "Synchronous Replication" should really
be called "Streaming Replication". Perhaps it may eventually support
a synchronous mode of operation, but that will probably never be the
only one.

...Robert

#3Matheus Ricardo Espanhol
matheusespanhol@gmail.com
In reply to: Peter Eisentraut (#1)
Re: "Hot standby"?

Am I off? What other definition of terms justifies the description of "hot
standby"?

I think that "Hot Standby" is associated with the high WAL recovery
capacity.
In my opinion, is a good term to symbolizes the superiority compared with
"Warm Standby".

--
Matheus Ricardo Espanhol
---------------------------------------
Dextra Sistemas
http://www.dextra.com.br/postgres/

#4Bruce Momjian
bruce@momjian.us
In reply to: Robert Haas (#2)
Re: "Hot standby"?

Robert Haas wrote:

On Tue, Aug 11, 2009 at 5:30 AM, Peter Eisentraut<peter_e@gmx.net> wrote:

What is "hot" and "standby" about the proposed "hot standby" feature?

OK, so it is "warm slave".

Absolutely nothing. It's horribly misnamed.

I have also long argued that "Synchronous Replication" should really
be called "Streaming Replication". Perhaps it may eventually support
a synchronous mode of operation, but that will probably never be the
only one.

Yes, I like "streaming replication" because no matter how we implement
this feature, there are going to be synchronous and asynchronous modes
eventually.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

#5Kevin Grittner
Kevin.Grittner@wicourts.gov
In reply to: Bruce Momjian (#4)
Re: "Hot standby"?

Bruce Momjian <bruce@momjian.us> wrote:

OK, so it is "warm slave".

That is technically accurate, given the preceding definitions, but it
has disturbing connotations. Enough so, in my view, to merit getting
a little more creative in the naming. How about "warm replica"?
Other ideas?

I agree that the present moniker misleads.

-Kevin

#6David E. Wheeler
david@kineticode.com
In reply to: Bruce Momjian (#4)
Re: "Hot standby"?

On Aug 11, 2009, at 5:32 AM, Bruce Momjian wrote:

OK, so it is "warm slave".

I suggest steaming servant. Or tepid assistant.

David

#7Gianni Ciolli
gianni.ciolli@2ndquadrant.it
In reply to: Peter Eisentraut (#1)
Re: "Hot standby"?

On Tue, Aug 11, 2009 at 12:30:58PM +0300, Peter Eisentraut wrote:

warm - If the first node dies, the replacement node needs to do some work to
get ready, but it's a lot quicker than "cold".

hot - If the first node dies, the replacement node can take over immediately.

For example, I'd say that a DRBD-based solution would be a cold standby.
Among WAL-based solutions, what we have now with pg_standby (nomen est omen),
is a warmish standby. From what I understand, Simon's patch set does not
change the "warm" property of this arrangement at all. It only changes the
"standby" to a "slave".

Am I off? What other definition of terms justifies the description of "hot
standby"?

As for "warm/hot", it depends on what you exactly mean with "get
ready":

(A) If you mean "it is possible to connect to the second node", then
Simon's patch is "hot".

IIRC this meaning agrees with the terminology used by other
databases, such as Oracle, Sybase, etc.

(B) If you mean "the contents of the second node are equal to the
contents of the first node", then Simon's patch is "warm".

But then we have by definition "hot" == "synchronous" and "either
warm or cold" == "asynchronous". IMHO the other case is
preferrable, as the word sets "synchronous/asynchronous" and
"cold/warm/hot" are more expressive because they measure two
independent properties.

Best regards,
Dr. Gianni Ciolli - 2ndQuadrant Italia
PostgreSQL Training, Services and Support
gianni.ciolli@2ndquadrant.it | www.2ndquadrant.it

#8Joshua D. Drake
jd@commandprompt.com
In reply to: David E. Wheeler (#6)
Re: "Hot standby"?

On Tue, 2009-08-11 at 08:12 -0700, David E. Wheeler wrote:

On Aug 11, 2009, at 5:32 AM, Bruce Momjian wrote:

OK, so it is "warm slave".

I suggest steaming servant. Or tepid assistant.

We can't use those, I think they are on the list for Ubuntu.

Joshua D. Drake

David

--
PostgreSQL - XMPP: jdrake@jabber.postgresql.org
Consulting, Development, Support, Training
503-667-4564 - http://www.commandprompt.com/
The PostgreSQL Company, serving since 1997

#9David Fetter
david@fetter.org
In reply to: Kevin Grittner (#5)
Re: "Hot standby"?

On Tue, Aug 11, 2009 at 08:56:38AM -0500, Kevin Grittner wrote:

Bruce Momjian <bruce@momjian.us> wrote:

OK, so it is "warm slave".

That is technically accurate, given the preceding definitions, but
it has disturbing connotations. Enough so, in my view, to merit
getting a little more creative in the naming. How about "warm
replica"? Other ideas?

Warm Read
Streamed Copy

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

#10Josh Berkus
josh@agliodbs.com
In reply to: David E. Wheeler (#6)
Re: "Hot standby"?

Peter,

I believe we're just copying Oracle's terminology. While that
terminology is not consistent, it is understood by the industry. Oracle
defined their Hot Standby to have both asynchronous and synchronous modes:
http://www.oracle.com/technology/products/rdb/htdocs/dbms/hotstandby.html

The other industry term which would be understood would be "log-based
replication". Terms we invent would be less likely to be understood,
and users would not get excited about them.

Otherwise, I say we go with "simmering follower". ;-)

--
Josh Berkus
PostgreSQL Experts Inc.
www.pgexperts.com

#11Robert Haas
robertmhaas@gmail.com
In reply to: Josh Berkus (#10)
Re: "Hot standby"?

On Tue, Aug 11, 2009 at 1:08 PM, Josh Berkus<josh@agliodbs.com> wrote:

I believe we're just copying Oracle's terminology.  While that
terminology is not consistent, it is understood by the industry.  Oracle
defined their Hot Standby to have both asynchronous and synchronous modes:
http://www.oracle.com/technology/products/rdb/htdocs/dbms/hotstandby.html

I think that you are wrong. Hot Standby is described in that document
as a way of replication the database and providing failover in the
event that the master dies. This feature has to do with allowing
queries to be executed on the slave, which is not discussed in that
document.

...Robert

#12Ron Mayer
rm_pg@cheapcomplexdevices.com
In reply to: David Fetter (#9)
Re: "Hot standby"?

David Fetter wrote:

On Tue, Aug 11, 2009 at 08:56:38AM -0500, Kevin Grittner wrote:

Bruce Momjian <bruce@momjian.us> wrote:

OK, so it is "warm slave".

Why isn't it just a "read only slave". Do some systems
have read-only slave databases that can't serve as a warm
standby system as well as this one could?

That is technically accurate, given the preceding definitions, but
it has disturbing connotations. Enough so, in my view, to merit
getting a little more creative in the naming. How about "warm
replica"? Other ideas?

Warm Read
Streamed Copy

Master/Slave Replication and Warm Standby systems are common
enough terms that I can google them or look them up in many
computer science books.

While coming up with creative politically correct euphemisms
might be fun, I hope we stick near terms that other DBAs could
already be familiar with.

ISTM the best way to refer to it formally would be a
"Read Only Slave / Warm Standby"
system, even if informally we might have informal
discussions of "just how hot our slaves are" when hot-standby
features get added down the road.

#13Mark Mielke
mark@mark.mielke.cc
In reply to: Kevin Grittner (#5)
Re: "Hot standby"?

On 08/11/2009 09:56 AM, Kevin Grittner wrote:

Bruce Momjian<bruce@momjian.us> wrote:

OK, so it is "warm slave".

That is technically accurate, given the preceding definitions, but it
has disturbing connotations. Enough so, in my view, to merit getting
a little more creative in the naming. How about "warm replica"?
Other ideas?

I agree that the present moniker misleads.

I remember this debate from 6 months ago. :-)

I prefer not to try and fit square pegs into round holes. Streaming
replication sounds like the best description. It may not be the keywords
that newbies are looking for, but too bad for them. Calling it something
different than what it is, just so that people who don't understand why
it is wrong will have something that approximates the right
understanding, is not a just cause. :-)

Cheers,
mark

--
Mark Mielke<mark@mielke.cc>

#14Robert Haas
robertmhaas@gmail.com
In reply to: Mark Mielke (#13)
Re: "Hot standby"?

On Tue, Aug 11, 2009 at 2:48 PM, Mark Mielke<mark@mark.mielke.cc> wrote:

On 08/11/2009 09:56 AM, Kevin Grittner wrote:

Bruce Momjian <bruce@momjian.us> wrote:

OK, so it is "warm slave".

That is technically accurate, given the preceding definitions, but it
has disturbing connotations. Enough so, in my view, to merit getting
a little more creative in the naming. How about "warm replica"?
Other ideas?

I agree that the present moniker misleads.

I remember this debate from 6 months ago. :-)

I prefer not to try and fit square pegs into round holes. Streaming
replication sounds like the best description. It may not be the keywords
that newbies are looking for, but too bad for them. Calling it something
different than what it is, just so that people who don't understand why it
is wrong will have something that approximates the right understanding, is
not a just cause. :-)

Uhm, I think you are confused.

Hot Standby = Allow read-only queries on a PostgreSQL server during
archive recovery
Synchronous (or Streaming) Replication = Allow WAL to be streamed on a
byte level rather than copied file-by-file

Hot Standby is not any sort of replication.

...Robert

#15Robert Haas
robertmhaas@gmail.com
In reply to: Ron Mayer (#12)
Re: "Hot standby"?

On Tue, Aug 11, 2009 at 2:10 PM, Ron Mayer<rm_pg@cheapcomplexdevices.com> wrote:

David Fetter wrote:

On Tue, Aug 11, 2009 at 08:56:38AM -0500, Kevin Grittner wrote:

Bruce Momjian <bruce@momjian.us> wrote:

OK, so it is "warm slave".

Why isn't it just a "read only slave".  Do some systems
have read-only slave databases that can't serve as a warm
standby system as well as this one could?

I think that's about right. What we have now via pg_standby or
similar tools is a warm standby. What this tool does is makes the
warm-standby also serve as a read-only slave. It doesn't make
failover any simpler so it's not making the standby any hotter - it
instead makes the standby be able to do more useful work when no
failover has occurred.

The technical description for the commit message is probably something
like this:

"Allow read-only queries to be processed during archive recovery."

The P/R version is probably something like this:

"Warm standby servers now function as read-only slaves."

...Robert

#16Mark Mielke
mark@mark.mielke.cc
In reply to: Robert Haas (#14)
Re: "Hot standby"?

On 08/11/2009 02:52 PM, Robert Haas wrote:

On Tue, Aug 11, 2009 at 2:48 PM, Mark Mielke<mark@mark.mielke.cc> wrote:

I remember this debate from 6 months ago. :-)

I prefer not to try and fit square pegs into round holes. Streaming
replication sounds like the best description. It may not be the keywords
that newbies are looking for, but too bad for them. Calling it something
different than what it is, just so that people who don't understand why it
is wrong will have something that approximates the right understanding, is
not a just cause. :-)

Uhm, I think you are confused.

Hot Standby = Allow read-only queries on a PostgreSQL server during
archive recovery
Synchronous (or Streaming) Replication = Allow WAL to be streamed on a
byte level rather than copied file-by-file

Hot Standby is not any sort of replication.

I don't think I was confused before - but I am confused now. :-)

This patch does not provide streaming replication?

Having the standby allow for read-only queries is a "would be nice" for
me, but it's not very useful. I've been monitoring these threads (and
wishing they were at a level I could participate and contribute on),
because I want the ability to have near real time updates such that the
standby can become live. "Hot standby" to me means "the slave is as
close to up-to-date as possible and can potentially take over at any
time in a near instance." This *implies* some sort of streaming
replication (byte level rather than file-by-file) rather than waiting
for WAL logs to become full and shipped.

If this patch doesn't give me near real time replication, then I am
confused about why I would want it at all. pg_standby already gives the
ability to do replication on a per completed WAL log file basis.

Cheers,
mark

--
Mark Mielke<mark@mielke.cc>

#17Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Mark Mielke (#16)
Re: "Hot standby"?

Mark Mielke escribi�:

I don't think I was confused before - but I am confused now. :-)

This patch does not provide streaming replication?

No. What it does is allow you to query the slave while it's still
replaying transactions. There's another patch allowing you to do
"stream replication". Hopefully both things could be used
simultaneously.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

#18Kevin Grittner
Kevin.Grittner@wicourts.gov
In reply to: Mark Mielke (#16)
Re: "Hot standby"?

Mark Mielke <mark@mark.mielke.cc> wrote:

This patch does not provide streaming replication?

There's a separate effort to provide asynchronous and synchronous
streaming replication. Different patch.

"Hot standby" to me means "the slave is as close to up-to-date as
possible and can potentially take over at any time in a near
instance." This *implies* some sort of streaming replication (byte
level rather than file-by-file) rather than waiting for WAL logs to
become full and shipped.

Most of use would expect that from something called "hot standby".
That's why so many of us have been saying that the name is misleading.
This patch, as I understand it, would allow you to use the warm
standby to run read-only queries -- for reports and such, to take some
load off the primary database. No more; no less.

So it's still warm, not hot, and it's still usable as a warm standby.
It just lets you squeeze a little extra benefit from the copy while it
sits there periodically updating itself.

-Kevin

#19Josh Berkus
josh@agliodbs.com
In reply to: Kevin Grittner (#18)
Re: "Hot standby"?

All,

So really, the "streaming replication" patch should be called "hot
standby", and the "hot standby" patch should be called "read only slaves"?

And *why* can't we call it log-based replication?

--
Josh Berkus
PostgreSQL Experts Inc.
www.pgexperts.com

#20Merlin Moncure
mmoncure@gmail.com
In reply to: Josh Berkus (#19)
Re: "Hot standby"?

On Tue, Aug 11, 2009 at 4:07 PM, Josh Berkus<josh@agliodbs.com> wrote:

All,

So really, the "streaming replication" patch should be called "hot
standby", and the "hot standby" patch should be called "read only slaves"?

And *why* can't we call it log-based replication?

+1

*) it _is_ used to replicate a database (replicate means make a copy!)
*) our target market will perceive it that way
*) sounds cool

'synchronous log-based replication'
'asynchronous log-based replication'
or,
'log-based replication', in both synchronous and asynchronous modes

merlin

#21Gianni Ciolli
gianni.ciolli@2ndquadrant.it
In reply to: Robert Haas (#11)
#22Peter Eisentraut
peter_e@gmx.net
In reply to: Gianni Ciolli (#7)
#23Robert Haas
robertmhaas@gmail.com
In reply to: Josh Berkus (#19)
#24PFC
lists@peufeu.com
In reply to: Peter Eisentraut (#22)
#25Andrew Dunstan
andrew@dunslane.net
In reply to: PFC (#24)
#26Josh Berkus
josh@agliodbs.com
In reply to: PFC (#24)
#27Gianni Ciolli
gianni.ciolli@2ndquadrant.it
In reply to: Peter Eisentraut (#22)
#28Bruce Momjian
bruce@momjian.us
In reply to: Robert Haas (#23)
#29Bruce Momjian
bruce@momjian.us
In reply to: Robert Haas (#23)
#30Bruce Momjian
bruce@momjian.us
In reply to: Bruce Momjian (#29)
#31Robert Haas
robertmhaas@gmail.com
In reply to: Bruce Momjian (#29)
#32Mark Mielke
mark@mark.mielke.cc
In reply to: Robert Haas (#31)
#33Markus Wanner
markus@bluegap.ch
In reply to: Robert Haas (#2)
#34Bruce Momjian
bruce@momjian.us
In reply to: Robert Haas (#31)
#35Joshua Tolley
eggyknap@gmail.com
In reply to: Robert Haas (#31)
#36Kevin Grittner
Kevin.Grittner@wicourts.gov
In reply to: Bruce Momjian (#30)
#37Bruce Momjian
bruce@momjian.us
In reply to: Mark Mielke (#32)