Re: [HACKERS] [PATCH] Document the order of changing certain settings when using hot-standby servers
On 9/1/17 13:00, Robert Haas wrote: > Now you're proposing to add: > > If you want to increase these values you > should do so on all standby servers first, before applying the changes to > the primary. If you instead want to decrease these values you should do so > on the primary first, before applying the changes to all standby servers. > > But that's just the obvious logical consequence of the existing statement. > > If we're going to add this text, I'd move it one sentence earlier and > stick "Therefore, " at the beginning. Committed incorporating that suggestion. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] [PATCH] Document the order of changing certain settings when using hot-standby servers
On Thu, Apr 13, 2017 at 8:29 AM, Yorick Petersewrote: > Good point, right now it can give you the idea that applying it to just > 1 standby (instead of all of them) is good enough, when instead you > need to apply it to all of them. > > Attached is an adjusted version of my changes to better reflect this. To me, this just seems redundant. The existing documentation already says: For these parameters, the value on the standby must be equal to or greater than the value on the primary. If these parameters are not set high enough then the standby will refuse to start. Now you're proposing to add: If you want to increase these values you should do so on all standby servers first, before applying the changes to the primary. If you instead want to decrease these values you should do so on the primary first, before applying the changes to all standby servers. But that's just the obvious logical consequence of the existing statement. If we're going to add this text, I'd move it one sentence earlier and stick "Therefore, " at the beginning. But it strikes me that it's just a bet that if we say things twice instead of once, people will pay more attention -- which is maybe true, but if that's done on a widespread basis, it will cause the documentation to become bloated. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] [PATCH] Document the order of changing certain settings when using hot-standby servers
Aleksander, > What you actually meant probably was "do so on ALL standby servers > first", right? Good point, right now it can give you the idea that applying it to just 1 standby (instead of all of them) is good enough, when instead you need to apply it to all of them. Attached is an adjusted version of my changes to better reflect this. Yorick diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml index 51359d6236..8f382d0b93 100644 *** a/doc/src/sgml/high-availability.sgml --- b/doc/src/sgml/high-availability.sgml *** *** 2098,2104 LOG: database system is ready to accept read only connections be equal to or greater than the value on the primary. If these parameters are not set high enough then the standby will refuse to start. Higher values can then be supplied and the server ! restarted to begin recovery again. These parameters are: --- 2098,2108 be equal to or greater than the value on the primary. If these parameters are not set high enough then the standby will refuse to start. Higher values can then be supplied and the server ! restarted to begin recovery again. If you want to increase these values you ! should do so on all standby servers first, before applying the changes to ! the primary. If you instead want to decrease these values you should do so ! on the primary first, before applying the changes to all standby servers. ! These parameters are: -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] [PATCH] Document the order of changing certain settings when using hot-standby servers
Hi Yorick, > should do so on any standby servers first, before applying the changes to What you actually meant probably was "do so on ALL standby servers first", right? -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature
Re: [HACKERS] [PATCH] Document the order of changing certain settings when using hot-standby servers
Done! It can be found at https://commitfest.postgresql.org/14/1110/ Thanks for reviewing thus far :) Yorick -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] [PATCH] Document the order of changing certain settings when using hot-standby servers
Hi Yorick, > Attached is an updated version of the patch that corrects the order in > the documentation. Looks promising. I would recommend to add this patch to the next commitfest [1]. Otherwise there is a chance that it will be lost. [1] https://commitfest.postgresql.org/14/ -- Best regards, Aleksander Alekseev pgpRyayBlz4tm.pgp Description: OpenPGP digital signature
Re: [HACKERS] [PATCH] Document the order of changing certain settings when using hot-standby servers
Ha! It seems I indeed had it the other way around. I suppose that's what happens when writing a patch late at night. Somewhat ironically I did have the other correct in my Git commit message. Attached is an updated version of the patch that corrects the order in the documentation. Yorick diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml index 51359d6236..434afe5d43 100644 *** a/doc/src/sgml/high-availability.sgml --- b/doc/src/sgml/high-availability.sgml *** *** 2098,2104 LOG: database system is ready to accept read only connections be equal to or greater than the value on the primary. If these parameters are not set high enough then the standby will refuse to start. Higher values can then be supplied and the server ! restarted to begin recovery again. These parameters are: --- 2098,2108 be equal to or greater than the value on the primary. If these parameters are not set high enough then the standby will refuse to start. Higher values can then be supplied and the server ! restarted to begin recovery again. If you want to increase these values you ! should do so on any standby servers first, before applying the changes to ! the primary. If you instead want to decrease these values you should do so ! on the primary first, before applying the changes to any standby servers. ! These parameters are: -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] [PATCH] Document the order of changing certain settings when using hot-standby servers
Aleksander, Yorick, * Aleksander Alekseev (a.aleks...@postgrespro.ru) wrote: > > The attached patch updates the hot-standby documentation (in the high > > availability section) so it explicitly mentions that certain settings > > need to be applied to servers in a particular order. For example, it > > states that if you increase a certain setting (e.g. max_connections) > > you need to do so on a primary first, before applying it to any > > secondaries. > > I'm sorry to inform you that your description of max_connection is, > lets say, not quite accurate. I've just increased max_connections on a > standby without doing anything on a master and nothing wrong happened. Right, the logic there is reversed- reduction has to be done on the primary first and then WAL replayed on the replica, while increasing has to be done on the secondary first and then on the primary. I do think that we should add the (correct!) information into the docs explicitly, perhaps even as a 'Note', since it can be quite confusing otherwise. Thanks! Stephen signature.asc Description: Digital signature
Re: [HACKERS] [PATCH] Document the order of changing certain settings when using hot-standby servers
Hi Yorick, > The attached patch updates the hot-standby documentation (in the high > availability section) so it explicitly mentions that certain settings > need to be applied to servers in a particular order. For example, it > states that if you increase a certain setting (e.g. max_connections) > you need to do so on a primary first, before applying it to any > secondaries. I'm sorry to inform you that your description of max_connection is, lets say, not quite accurate. I've just increased max_connections on a standby without doing anything on a master and nothing wrong happened. -- Best regards, Aleksander Alekseev pgpqfeUI2TpqL.pgp Description: OpenPGP digital signature