public inbox for [email protected]  
help / color / mirror / Atom feed
"Alter system" command documentation
6+ messages / 4 participants
[nested] [flat]

* "Alter system" command documentation
@ 2015-06-15 16:32  Jeff Janes <[email protected]>
  0 siblings, 1 reply; 6+ messages in thread

From: Jeff Janes @ 2015-06-15 16:32 UTC (permalink / raw)
  To: pgsql-docs

--089e013d1924505e56051890ff9d
Content-Type: text/plain; charset=UTF-8

Hi,



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: "Alter system" command documentation
@ 2015-06-15 20:58  Euler Taveira <[email protected]>
  parent: Jeff Janes <[email protected]>
  0 siblings, 1 reply; 6+ messages in thread

From: Euler Taveira @ 2015-06-15 20:58 UTC (permalink / raw)
  To: Jeff Janes <[email protected]>; pgsql-docs

On 15-06-2015 13:32, Jeff Janes wrote:
> From http://www.postgresql.org/docs/current/static/sql-altersystem.html
> 
> "Values set with ALTER SYSTEM will be effective after the next server
> configuration reload (SIGHUP or pg_ctl reload), or after the next server
> restart in the case of parameters that can only be changed at server start."
> 
> Isn't it unfortunate that the command used for changing the
> configuration file from within SQL mentions SIGHUP and pg_ctl reload,
> but not "select pg_reload_conf();", as a way to activate that change?  
> 
SIGHUP is an implementation detail. If I were to change that sentence,
my preference is replace SIGHUP with pg_reload_conf.


-- 
   Euler Taveira                   Timbira - http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento


-- 
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: "Alter system" command documentation
@ 2015-06-15 21:10  David G. Johnston <[email protected]>
  parent: Euler Taveira <[email protected]>
  0 siblings, 2 replies; 6+ messages in thread

From: David G. Johnston @ 2015-06-15 21:10 UTC (permalink / raw)
  To: Euler Taveira <[email protected]>; +Cc: Jeff Janes <[email protected]>; pgsql-docs

On Mon, Jun 15, 2015 at 4:58 PM, Euler Taveira <[email protected]> wrote:

> On 15-06-2015 13:32, Jeff Janes wrote:
> > From http://www.postgresql.org/docs/current/static/sql-altersystem.html
> >
> > "Values set with ALTER SYSTEM will be effective after the next server
> > configuration reload (SIGHUP or pg_ctl reload), or after the next server
> > restart in the case of parameters that can only be changed at server
> start."
> >
> > Isn't it unfortunate that the command used for changing the
> > configuration file from within SQL mentions SIGHUP and pg_ctl reload,
> > but not "select pg_reload_conf();", as a way to activate that change?
> >
> SIGHUP is an implementation detail. If I were to change that sentence,
> my preference is replace SIGHUP with pg_reload_conf.
> ​
>

​I ​
disagree on SIGHUP being an implementation detail.
​
​  Using signals in IPC (inter-process communication) is a public API that
should be documented when applicable.  Yes, various command-line and SQL
commands and functions have been provided so that one does not have to use
raw signals but they are still part of the public API for the application.

Adding mention of pg_reload_conf may be warranted (probably is but I
haven't made an independent evaluation) but removing SIGHUP is a separate
concern and one that doesn't seem necessary.

David J.
​


^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: "Alter system" command documentation
@ 2015-06-16 01:14  Alvaro Herrera <[email protected]>
  parent: David G. Johnston <[email protected]>
  1 sibling, 1 reply; 6+ messages in thread

From: Alvaro Herrera @ 2015-06-16 01:14 UTC (permalink / raw)
  To: David G. Johnston <[email protected]>; +Cc: Euler Taveira <[email protected]>; Jeff Janes <[email protected]>; pgsql-docs

David G. Johnston wrote:
> On Mon, Jun 15, 2015 at 4:58 PM, Euler Taveira <[email protected]> wrote:
> 
> > On 15-06-2015 13:32, Jeff Janes wrote:

> > > Isn't it unfortunate that the command used for changing the
> > > configuration file from within SQL mentions SIGHUP and pg_ctl
> > > reload, but not "select pg_reload_conf();", as a way to activate
> > > that change?
> > >
> > SIGHUP is an implementation detail. If I were to change that
> > sentence, my preference is replace SIGHUP with pg_reload_conf.
> 
> I disagree on SIGHUP being an implementation detail.  Using signals in
> IPC (inter-process communication) is a public API that should be
> documented when applicable.

Agreed.  However, I don't think it makes sense to document that either
SIGHUP, pg_ctl reload, and pg_reload_conf() can be used whenever a
parameter reload is mentioned; that would bloat too much (in a quick
grep, I see at least 10-15 places where SIGHUP or "reload" is mentioned
in the context of config files.)  Maybe we should have one section
somewhere, saying "reload is executed by any of the following:" and list
them all.  Then this place and others could simply say "these values are
effective after reload, about which see section X.Y.Z".

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


-- 
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: "Alter system" command documentation
@ 2015-06-16 02:34  Jeff Janes <[email protected]>
  parent: David G. Johnston <[email protected]>
  1 sibling, 0 replies; 6+ messages in thread

From: Jeff Janes @ 2015-06-16 02:34 UTC (permalink / raw)
  To: David G. Johnston <[email protected]>; +Cc: Euler Taveira <[email protected]>; pgsql-docs

On Mon, Jun 15, 2015 at 2:10 PM, David G. Johnston <
[email protected]> wrote:

> On Mon, Jun 15, 2015 at 4:58 PM, Euler Taveira <[email protected]>
> wrote:
>
>> On 15-06-2015 13:32, Jeff Janes wrote:
>> > From http://www.postgresql.org/docs/current/static/sql-altersystem.html
>> >
>> > "Values set with ALTER SYSTEM will be effective after the next server
>> > configuration reload (SIGHUP or pg_ctl reload), or after the next server
>> > restart in the case of parameters that can only be changed at server
>> start."
>> >
>> > Isn't it unfortunate that the command used for changing the
>> > configuration file from within SQL mentions SIGHUP and pg_ctl reload,
>> > but not "select pg_reload_conf();", as a way to activate that change?
>> >
>> SIGHUP is an implementation detail. If I were to change that sentence,
>> my preference is replace SIGHUP with pg_reload_conf.
>> ​
>>
>
> ​I ​
> disagree on SIGHUP being an implementation detail.
> ​
> ​  Using signals in IPC (inter-process communication) is a public API that
> should be documented when applicable.  Yes, various command-line and SQL
> commands and functions have been provided so that one does not have to use
> raw signals but they are still part of the public API for the application.
>
> Adding mention of pg_reload_conf may be warranted (probably is but I
> haven't made an independent evaluation) but removing SIGHUP is a separate
> concern and one that doesn't seem necessary.
>

Certainly SIGHUP should be (and is) documented elsewhere in the docs.  But
there is no reason for it to be documented on this particular page, which
is about a command we added specifically so you can make config changes
without having to drop into an OS shell.  If we are going to mention (on
this particularly page) only some of the ways to trigger a reload,
certainly the way that also doesn't require dropping into an OS shell
should be among the ones included. I don't know that pg_reload_conf()
should be the only one we mention here.  But surely it should not be the
only one we don't mention.

The cleanest way would probably be to mention this in addition to the other
two, as to mention only this one might imply the others don't work for this
purpose.  We could not mention any of them and let the person go read the
other parts of the docs on their own to find the methods used to trigger a
reload, but that seems legalistic and unhelpful.

In any event, I was mildly annoyed to go read the docs about a feature I
was aware of but never needed to use it before, and have it tell me about
two things which I already knew about but which aren't very useful in this
context (that is, not having convenient shell access at the moment), while
not telling me about the third option which actually is useful in this
context but which I didn't know how to spell (because I almost always use
the other two methods instead--except for right now).

Cheers,

Jeff


^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: "Alter system" command documentation
@ 2015-06-16 16:42  Euler Taveira <[email protected]>
  parent: Alvaro Herrera <[email protected]>
  0 siblings, 0 replies; 6+ messages in thread

From: Euler Taveira @ 2015-06-16 16:42 UTC (permalink / raw)
  To: Alvaro Herrera <[email protected]>; David G. Johnston <[email protected]>; +Cc: Jeff Janes <[email protected]>; pgsql-docs

On 15-06-2015 21:14, Alvaro Herrera wrote:
> Maybe we should have one section
> somewhere, saying "reload is executed by any of the following:" and list
> them all.  Then this place and others could simply say "these values are
> effective after reload, about which see section X.Y.Z".
>
+1.


-- 
   Euler Taveira                   Timbira - http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento


-- 
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs




^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2015-06-16 16:42 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-06-15 16:32 "Alter system" command documentation Jeff Janes <[email protected]>
2015-06-15 20:58 ` Euler Taveira <[email protected]>
2015-06-15 21:10   ` David G. Johnston <[email protected]>
2015-06-16 01:14     ` Alvaro Herrera <[email protected]>
2015-06-16 16:42       ` Euler Taveira <[email protected]>
2015-06-16 02:34     ` Jeff Janes <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox