Thread: primary/secondary/master/slave/standby
The server's messages and the documentation uses all of these terms in mixed ways. Maybe we could decide on some preferred terminology and adjust the existing texts. Ideas?
On Wed, May 12, 2010 at 07:33:53PM +0300, Peter Eisentraut wrote: > The server's messages and the documentation uses all of these terms in > mixed ways. Maybe we could decide on some preferred terminology and > adjust the existing texts. Ideas? How about origin/subscriber? More descriptive than primary/secondary, and less tied to a particular model of interaction. 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 iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate
Peter Eisentraut <peter_e@gmx.net> writes: > The server's messages and the documentation uses all of these terms in > mixed ways. Maybe we could decide on some preferred terminology and > adjust the existing texts. Ideas? Primary/secondary seem like a poor choice because they're such generic terms. Master/slave is the common terminology for this, I think, though some might object on grounds of political incorrectness. If so, master/standby would probably work. regards, tom lane
David Fetter <david@fetter.org> wrote: > How about origin/subscriber? Seems like a mixed metaphor. Publisher normally goes with subscriber. I've heard and used origin and replica. Are we planning to support a subscriber which also publishes (to randomly pick one for purposes of discussion)? If so, that should be considered in our choice of terminology. -Kevin
On Wed, 2010-05-12 at 09:37 -0700, David Fetter wrote: > On Wed, May 12, 2010 at 07:33:53PM +0300, Peter Eisentraut wrote: > > The server's messages and the documentation uses all of these terms in > > mixed ways. Maybe we could decide on some preferred terminology and > > adjust the existing texts. Ideas? > > How about origin/subscriber? More descriptive than primary/secondary, > and less tied to a particular model of interaction. Yes but completely out of scope within the market. Master/Slave or Master/Standby is probably where it needs to be. Joshua D. Drake -- PostgreSQL.org Major Contributor Command Prompt, Inc: http://www.commandprompt.com/ - 503.667.4564 Consulting, Training, Support, Custom Development, Engineering
Tom Lane wrote: > If so, master/standby would probably work. +1 for master/standby. It's worth remembering that a "standby server" might not be actively connected to a master server. A server that's reading WAL from an archive backup, for example, can be put to standby mode. "Standby" covers that case too, better than "slave". -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com
On Wed, 2010-05-12 at 19:33 +0300, Peter Eisentraut wrote: > The server's messages and the documentation uses all of these terms in > mixed ways. Maybe we could decide on some preferred terminology and > adjust the existing texts. Ideas? Never user the term "secondary" myself. I deliberately use "standby" rather than "slave", to differentiate between an exact replica and a synchronised copy (respectively). I use the terms "primary" and "master" more freely but generally try to use primary/standby and master/slave together. If you wanted to move to just one, it would be "master", though we'd need to have a good explanation of "primary" in the index. -- Simon Riggs www.2ndQuadrant.com
On Wed, May 12, 2010 at 3:01 PM, Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> wrote: > Tom Lane wrote: >> If so, master/standby would probably work. > > +1 for master/standby. > > It's worth remembering that a "standby server" might not be actively > connected to a master server. A server that's reading WAL from an > archive backup, for example, can be put to standby mode. "Standby" > covers that case too, better than "slave". So does this mean we should rename primary_conninfo? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise Postgres Company
Tom Lane wrote: > Peter Eisentraut <peter_e@gmx.net> writes: > > The server's messages and the documentation uses all of these terms in > > mixed ways. Maybe we could decide on some preferred terminology and > > adjust the existing texts. Ideas? > > Primary/secondary seem like a poor choice because they're such generic > terms. Master/slave is the common terminology for this, I think, > though some might object on grounds of political incorrectness. > If so, master/standby would probably work. I have always been unclear if a slave indicates it accepts read-only queries, i.e. are slave and standby interchangable? -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com
On Wed, 2010-05-12 at 09:37 -0700, David Fetter wrote: > On Wed, May 12, 2010 at 07:33:53PM +0300, Peter Eisentraut wrote: > > The server's messages and the documentation uses all of these terms in > > mixed ways. Maybe we could decide on some preferred terminology and > > adjust the existing texts. Ideas? > > How about origin/subscriber? More descriptive than primary/secondary, > and less tied to a particular model of interaction. Yes but completely out of scope within the market. Master/Slave or Master/Standby is probably where it needs to be. Joshua D. Drake -- PostgreSQL.org Major Contributor Command Prompt, Inc: http://www.commandprompt.com/ - 503.667.4564 Consulting, Training, Support, Custom Development, Engineering
On Wed, May 12, 2010 at 5:44 PM, Bruce Momjian <bruce@momjian.us> wrote: > Tom Lane wrote: >> Peter Eisentraut <peter_e@gmx.net> writes: >> > The server's messages and the documentation uses all of these terms in >> > mixed ways. Maybe we could decide on some preferred terminology and >> > adjust the existing texts. Ideas? >> >> Primary/secondary seem like a poor choice because they're such generic >> terms. Master/slave is the common terminology for this, I think, >> though some might object on grounds of political incorrectness. >> If so, master/standby would probably work. > > I have always been unclear if a slave indicates it accepts read-only > queries, i.e. are slave and standby interchangable? We had a long discussion of this topic last summer: http://archives.postgresql.org/pgsql-hackers/2009-08/msg00870.php I still think Peter's right, but there were contrary opinions. Still, the discussion is an interesting read. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise Postgres Company
On 12/05/10 22:23, Robert Haas wrote: > On Wed, May 12, 2010 at 3:01 PM, Heikki Linnakangas > <heikki.linnakangas@enterprisedb.com> wrote: >> Tom Lane wrote: >>> If so, master/standby would probably work. >> >> +1 for master/standby. >> >> It's worth remembering that a "standby server" might not be actively >> connected to a master server. A server that's reading WAL from an >> archive backup, for example, can be put to standby mode. "Standby" >> covers that case too, better than "slave". > > So does this mean we should rename primary_conninfo? Yes, I think it does. I'll change it tomorrow, barring objections or someone else changing it first. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com
On Wed, May 12, 2010 at 8:00 PM, Simon Riggs <simon@2ndquadrant.com> wrote: > On Wed, 2010-05-12 at 19:33 +0300, Peter Eisentraut wrote: >> The server's messages and the documentation uses all of these terms in >> mixed ways. Maybe we could decide on some preferred terminology and >> adjust the existing texts. Ideas? > > Never user the term "secondary" myself. > > I deliberately use "standby" rather than "slave", to differentiate > between an exact replica and a synchronised copy (respectively). Fwiw I like the word "replica" but I don't see an obvious choice of word to pair it with -- greg
Greg Stark <gsstark@mit.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. -- dim
On 27/05/10 12:39, Dimitri Fontaine wrote: > Greg Stark<gsstark@mit.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 favourite, 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. Thoughts? -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com
On 27/05/10 12:39, Dimitri Fontaine wrote: > Greg Stark<gsstark@mit.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. Thoughts? -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com
On Thu, May 27, 2010 at 9:22 AM, Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> wrote: > On 27/05/10 12:39, Dimitri Fontaine wrote: >> >> Greg Stark<gsstark@mit.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. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise Postgres Company
On Tue, 2010-06-08 at 16:47 -0400, Robert Haas wrote: > On Thu, May 27, 2010 at 9:22 AM, Heikki Linnakangas > <heikki.linnakangas@enterprisedb.com> wrote: > > On 27/05/10 12:39, Dimitri Fontaine wrote: > >> > >> Greg Stark<gsstark@mit.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