Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
3fa9c416
Commit
3fa9c416
authored
Feb 04, 2006
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue a warning if a change-on-restart-only postgresql.conf value is
modified and the server config files are reloaded
parent
bc6a824c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
5 deletions
+52
-5
doc/TODO
doc/TODO
+1
-1
doc/src/FAQ/TODO.html
doc/src/FAQ/TODO.html
+3
-3
src/backend/utils/misc/guc.c
src/backend/utils/misc/guc.c
+48
-1
No files found.
doc/TODO
View file @
3fa9c416
...
@@ -83,7 +83,7 @@ Administration
...
@@ -83,7 +83,7 @@ Administration
o %Allow postgresql.conf file values to be changed via an SQL
o %Allow postgresql.conf file values to be changed via an SQL
API, perhaps using SET GLOBAL
API, perhaps using SET GLOBAL
o Allow the server to be stopped/restarted via an SQL API
o Allow the server to be stopped/restarted via an SQL API
o Issue a warning if a change-on-restart-only postgresql.conf value
o
-
Issue a warning if a change-on-restart-only postgresql.conf value
is modified and the server config files are reloaded
is modified and the server config files are reloaded
o Mark change-on-restart-only values in postgresql.conf
o Mark change-on-restart-only values in postgresql.conf
...
...
doc/src/FAQ/TODO.html
View file @
3fa9c416
...
@@ -26,7 +26,7 @@ first.
...
@@ -26,7 +26,7 @@ first.
<ul>
<ul>
<li>
%Remove behavior of postmaster -o
<li>
%Remove behavior of postmaster -o
</li><li>
-
*%Allow pooled connections to list all prepared statements*
</li><li>
-
<em>
%Allow pooled connections to list all prepared statements
</em>
<p>
This would allow an application inheriting a pooled connection to know
<p>
This would allow an application inheriting a pooled connection to know
the statements prepared in the current session.
the statements prepared in the current session.
</p>
</p>
...
@@ -79,8 +79,8 @@ first.
...
@@ -79,8 +79,8 @@ first.
</li><li>
%Allow postgresql.conf file values to be changed via an SQL
</li><li>
%Allow postgresql.conf file values to be changed via an SQL
API, perhaps using SET GLOBAL
API, perhaps using SET GLOBAL
</li><li>
Allow the server to be stopped/restarted via an SQL API
</li><li>
Allow the server to be stopped/restarted via an SQL API
</li><li>
Issue a warning if a change-on-restart-only postgresql.conf value
</li><li>
-
<em>
Issue a warning if a change-on-restart-only postgresql.conf value
is modified and the server config files are reloaded
is modified and the server config files are reloaded
</em>
</li><li>
Mark change-on-restart-only values in postgresql.conf
</li><li>
Mark change-on-restart-only values in postgresql.conf
</li></ul>
</li></ul>
</li><li>
Tablespaces
</li><li>
Tablespaces
...
...
src/backend/utils/misc/guc.c
View file @
3fa9c416
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
* Written by Peter Eisentraut <peter_e@gmx.net>.
* Written by Peter Eisentraut <peter_e@gmx.net>.
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.3
09 2006/01/09 10:05:31
petere Exp $
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.3
10 2006/02/04 12:50:47
petere Exp $
*
*
*--------------------------------------------------------------------
*--------------------------------------------------------------------
*/
*/
...
@@ -2201,6 +2201,7 @@ static void ReportGUCOption(struct config_generic * record);
...
@@ -2201,6 +2201,7 @@ static void ReportGUCOption(struct config_generic * record);
static
void
ShowGUCConfigOption
(
const
char
*
name
,
DestReceiver
*
dest
);
static
void
ShowGUCConfigOption
(
const
char
*
name
,
DestReceiver
*
dest
);
static
void
ShowAllGUCConfig
(
DestReceiver
*
dest
);
static
void
ShowAllGUCConfig
(
DestReceiver
*
dest
);
static
char
*
_ShowOption
(
struct
config_generic
*
record
);
static
char
*
_ShowOption
(
struct
config_generic
*
record
);
static
bool
is_newvalue_equal
(
struct
config_generic
*
record
,
const
char
*
newvalue
);
/*
/*
...
@@ -3631,7 +3632,15 @@ set_config_option(const char *name, const char *value,
...
@@ -3631,7 +3632,15 @@ set_config_option(const char *name, const char *value,
break
;
break
;
case
PGC_POSTMASTER
:
case
PGC_POSTMASTER
:
if
(
context
==
PGC_SIGHUP
)
if
(
context
==
PGC_SIGHUP
)
{
if
(
changeVal
&&
!
is_newvalue_equal
(
record
,
value
))
ereport
(
elevel
,
(
errcode
(
ERRCODE_CANT_CHANGE_RUNTIME_PARAM
),
errmsg
(
"parameter
\"
%s
\"
cannot be changed after server start; configuration file change ignored"
,
name
)));
return
true
;
return
true
;
}
if
(
context
!=
PGC_POSTMASTER
)
if
(
context
!=
PGC_POSTMASTER
)
{
{
ereport
(
elevel
,
ereport
(
elevel
,
...
@@ -5079,6 +5088,44 @@ _ShowOption(struct config_generic * record)
...
@@ -5079,6 +5088,44 @@ _ShowOption(struct config_generic * record)
}
}
static
bool
is_newvalue_equal
(
struct
config_generic
*
record
,
const
char
*
newvalue
)
{
switch
(
record
->
vartype
)
{
case
PGC_BOOL
:
{
struct
config_bool
*
conf
=
(
struct
config_bool
*
)
record
;
bool
newval
;
return
parse_bool
(
newvalue
,
&
newval
)
&&
*
conf
->
variable
==
newval
;
}
case
PGC_INT
:
{
struct
config_int
*
conf
=
(
struct
config_int
*
)
record
;
int
newval
;
return
parse_int
(
newvalue
,
&
newval
)
&&
*
conf
->
variable
==
newval
;
}
case
PGC_REAL
:
{
struct
config_real
*
conf
=
(
struct
config_real
*
)
record
;
double
newval
;
return
parse_real
(
newvalue
,
&
newval
)
&&
*
conf
->
variable
==
newval
;
}
case
PGC_STRING
:
{
struct
config_string
*
conf
=
(
struct
config_string
*
)
record
;
return
strcmp
(
*
conf
->
variable
,
newvalue
)
==
0
;
}
}
return
false
;
}
#ifdef EXEC_BACKEND
#ifdef EXEC_BACKEND
/*
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment