Hi all,
The six different kinds of contexts in the pg_settings system view
aren't terribly well documented. The current doc page says only:
"Context required to set the parameter's value". A search through the
archives turned up only a brief explanation[1] of what "postmaster"
means for this setting. The recent book "PostgreSQL 9.0 High
Performance"[2] complains "The context field isn't documented very
well in the official manual."
I've put together a patch to help document these values based on the
comments in guc.h, the explanations in [2], and my own understanding.
My crude explanations could probably use some further wordsmithing and
check for accuracy :-)
I avoided just copy-pasting from guc.h, particulary because some of
the explanations struck me as confusing or incorrect. For instance:
* not all USERSET options may be set "any time", such as
transaction_isolation if you're already in the middle of a
transaction.
* I found the explanation for BACKEND confusing; it wasn't clear to
me from the comment that a pg_ctl reload would change such settings
for future backends.
I could attempt a patch for the comments in guc.h too, if there's interest.
Cheers
Josh
--
[1] http://archives.postgresql.org/pgsql-admin/2006-05/msg00067.php
[2] p. 126, section "Allowed change context"