Re: primary/secondary/master/slave/standby

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Dimitri Fontaine <dfontaine(at)hi-media(dot)com>, Greg Stark <gsstark(at)mit(dot)edu>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: primary/secondary/master/slave/standby
Date: 2010-06-08 21:02:35
Message-ID: 1276030955.12489.3886.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 2010-06-08 at 16:47 -0400, Robert Haas wrote:
> On Thu, May 27, 2010 at 9:22 AM, Heikki Linnakangas
> <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> > On 27/05/10 12:39, Dimitri Fontaine wrote:
> >>
> >> Greg Stark<gsstark(at)mit(dot)edu> writes:
> >>>
> >>> Fwiw I like the word "replica" but I don't see an obvious choice of
> >>> word to pair it with
> >>
> >> I guess it's replica / origin, per choice of Jan Wieck to be found in
> >> our catalogs:
> >>
> >> http://www.postgresql.org/docs/current/static/catalog-pg-trigger.html
> >>
> >> tgenabled char
> >>
> >> Controls in which session_replication_role modes the trigger fires.
> >> O = trigger fires in "origin" and "local" modes, D = trigger is
> >> disabled, R = trigger fires in "replica" mode, A = trigger fires
> >> always.
> >>
> >> So that's origin/replica, master/slave, primary/standby, master/standby.
> >
> > master/standby is my favorite, and I believe we have a rough consensus on
> > that.
> >
> > I started to search/replace primary -> master, but started to have second
> > thoughts when I got to the section in the docs about standby servers:
> >
> > http://developer.postgresql.org/pgdocs/postgres/warm-standby.html
> >
> > Somehow that just doesn't sound as good after s/primary/master, the first
> > sentence in particular. I think the reason is that "master" brings to mind
> > an active connection between the master and standby, while "primary" sounds
> > more loosely-coupled.
> >
> > Perhaps we should use master/standby when discussing streaming replication,
> > and primary/standby when talking about a standby setup in general, possibly
> > using file-based log shipping. The distinction is quite vague, so we'll have
> > to document both terms as synonyms of each other.
>
> I agree. I think it might make sense to try to standardize on the use
> of "master" in messages (and GUC variable names) but insisting that we
> can never say "primary" in the docs would make them read very oddly, I
> think.

The reasons the two sets of terms exist is that they aren't completely
opposed. Master/slave is talking about who makes the changes and who
accepts them, whereas primary/standby is talking about who is currently
active and who is available to become active if required. Slony also
talks about origin/subscriber. SR also uses sender/receiver.

Which metaphor we use depends upon which aspect of the system we use. We
could have chosen not to introduce send/receive, but its so obvious and
natural for SR that its worth introducing new terms.

Master/standby sounds like a mixed metaphor to me and harder to
understand as a result.

--
Simon Riggs www.2ndQuadrant.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-06-08 21:03:57 Re: hot_standby = on
Previous Message Robert Haas 2010-06-08 21:01:28 Re: How about closing some Open Items?