pgsql: Allow some recovery parameters to be changed with reload

Started by Peter Eisentrautover 7 years ago7 messagescomitters
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

Allow some recovery parameters to be changed with reload

Change

archive_cleanup_command
promote_trigger_file
recovery_end_command
recovery_min_apply_delay

from PGC_POSTMASTER to PGC_SIGHUP. This did not require any further
changes.

Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: /messages/by-id/ca28011a-cfaa-565c-d622-c1907c33ecf7@2ndquadrant.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/13b89f96d07ad3da67b57f66c134c3609bd3e98f

Modified Files
--------------
doc/src/sgml/config.sgml | 21 +++++++++++++++++----
src/backend/utils/misc/guc.c | 8 ++++----
src/backend/utils/misc/postgresql.conf.sample | 4 ----
3 files changed, 21 insertions(+), 12 deletions(-)

#2Michael Paquier
michael@paquier.xyz
In reply to: Peter Eisentraut (#1)
Re: pgsql: Allow some recovery parameters to be changed with reload

On Thu, Feb 07, 2019 at 07:52:13AM +0000, Peter Eisentraut wrote:

Allow some recovery parameters to be changed with reload

Change

archive_cleanup_command
promote_trigger_file
recovery_end_command
recovery_min_apply_delay

from PGC_POSTMASTER to PGC_SIGHUP. This did not require any further
changes.

The timestamp of this commit is a bit messed up:
commit: 13b89f96d07ad3da67b57f66c134c3609bd3e98f
author: Peter Eisentraut <peter@eisentraut.org>
date: Mon, 4 Feb 2019 09:28:17 +0100
committer: Peter Eisentraut <peter@eisentraut.org>
date: Thu, 7 Feb 2019 08:34:48 +0100

Perhaps you overlooked a --reset-author switch?
--
Michael

#3Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Michael Paquier (#2)
Re: pgsql: Allow some recovery parameters to be changed with reload

On 2019-Feb-08, Michael Paquier wrote:

The timestamp of this commit is a bit messed up:
commit: 13b89f96d07ad3da67b57f66c134c3609bd3e98f
author: Peter Eisentraut <peter@eisentraut.org>
date: Mon, 4 Feb 2019 09:28:17 +0100
committer: Peter Eisentraut <peter@eisentraut.org>
date: Thu, 7 Feb 2019 08:34:48 +0100

Perhaps you overlooked a --reset-author switch?

I don't think we actually have a rule about these timestamps, and I
don't think we really care, do we?

--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#4Peter Eisentraut
peter_e@gmx.net
In reply to: Michael Paquier (#2)
Re: pgsql: Allow some recovery parameters to be changed with reload

On 08/02/2019 08:45, Michael Paquier wrote:

The timestamp of this commit is a bit messed up:

Where you say "a bit messed up" one might also say "accurately
reflecting history". :)

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alvaro Herrera (#3)
Re: pgsql: Allow some recovery parameters to be changed with reload

Alvaro Herrera <alvherre@2ndquadrant.com> writes:

On 2019-Feb-08, Michael Paquier wrote:

The timestamp of this commit is a bit messed up:
commit: 13b89f96d07ad3da67b57f66c134c3609bd3e98f
author: Peter Eisentraut <peter@eisentraut.org>
date: Mon, 4 Feb 2019 09:28:17 +0100
committer: Peter Eisentraut <peter@eisentraut.org>
date: Thu, 7 Feb 2019 08:34:48 +0100

Perhaps you overlooked a --reset-author switch?

I don't think we actually have a rule about these timestamps, and I
don't think we really care, do we?

Yeah, if you want to see a sequence of dates that makes sense,
you need to look at the commit-date. Whether the author-date
closely matches that depends on the particular committer's
workflow.

regards, tom lane

#6Stephen Frost
sfrost@snowman.net
In reply to: Tom Lane (#5)
Re: pgsql: Allow some recovery parameters to be changed with reload

Greetings,

* Tom Lane (tgl@sss.pgh.pa.us) wrote:

Alvaro Herrera <alvherre@2ndquadrant.com> writes:

On 2019-Feb-08, Michael Paquier wrote:

The timestamp of this commit is a bit messed up:
commit: 13b89f96d07ad3da67b57f66c134c3609bd3e98f
author: Peter Eisentraut <peter@eisentraut.org>
date: Mon, 4 Feb 2019 09:28:17 +0100
committer: Peter Eisentraut <peter@eisentraut.org>
date: Thu, 7 Feb 2019 08:34:48 +0100

Perhaps you overlooked a --reset-author switch?

I don't think we actually have a rule about these timestamps, and I
don't think we really care, do we?

Yeah, if you want to see a sequence of dates that makes sense,
you need to look at the commit-date. Whether the author-date
closely matches that depends on the particular committer's
workflow.

While I agree that we don't really have a formal policy, there are
certainly some who do (or, at least did) seem to care quite a bit about
this and that's why I've been using '--ignore-date' for quite some time
in my workflow:

/messages/by-id/CA+TgmobEgs1=AT0_SRvf6K9XrG7QAUyRNeuv5D9oaXrmpST9fw@mail.gmail.com

Thanks!

Stephen

#7Michael Paquier
michael@paquier.xyz
In reply to: Stephen Frost (#6)
Re: pgsql: Allow some recovery parameters to be changed with reload

On Sat, Feb 09, 2019 at 01:35:52PM -0500, Stephen Frost wrote:

While I agree that we don't really have a formal policy, there are
certainly some who do (or, at least did) seem to care quite a bit about
this and that's why I've been using '--ignore-date' for quite some time
in my workflow:

/messages/by-id/CA+TgmobEgs1=AT0_SRvf6K9XrG7QAUyRNeuv5D9oaXrmpST9fw@mail.gmail.com

I have messed up that one time in the last and I have noticed that
folks care about that, so I try to be careful and I use
--reset-author.  Now one reason why I got confused is that I had this
git alias to show a simple graph of the git commits:
-   graph = log --graph --date-order -C -M --pretty=format:\"<%h> %ad [%an] %Cgreen%d%Creset %s\" --all --date=short
+   graph = log --graph --date-order -C -M --pretty=format:\"<%h> %cd [%cn] %Cgreen%d%Creset %s\" --all --date=short

%ad and %an stand respectively for the author date and the author
name, and moving to %cd and $cn for the commit date and the committer
name is one way to improve things.
--
Michael