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
a486e357
Commit
a486e357
authored
May 14, 2015
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add pg_settings.pending_restart column
with input from David G. Johnston, Robert Haas, Michael Paquier
parent
333a870f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
5 deletions
+29
-5
doc/src/sgml/catalogs.sgml
doc/src/sgml/catalogs.sgml
+8
-0
src/backend/utils/misc/guc.c
src/backend/utils/misc/guc.c
+15
-1
src/include/catalog/catversion.h
src/include/catalog/catversion.h
+1
-1
src/include/catalog/pg_proc.h
src/include/catalog/pg_proc.h
+1
-1
src/include/utils/guc_tables.h
src/include/utils/guc_tables.h
+1
-0
src/test/regress/expected/rules.out
src/test/regress/expected/rules.out
+3
-2
No files found.
doc/src/sgml/catalogs.sgml
View file @
a486e357
...
...
@@ -9042,6 +9042,14 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
or when examined by a non-superuser)
</entry>
</row>
<row>
<entry><structfield>pending_restart</structfield></entry>
<entry><type>boolean</type></entry>
<entry><literal>true</literal> if the value has been changed in the
configuration file but needs a restart; or <literal>false</literal>
otherwise.
</entry>
</row>
</tbody>
</tgroup>
</table>
...
...
src/backend/utils/misc/guc.c
View file @
a486e357
...
...
@@ -5927,12 +5927,14 @@ set_config_option(const char *name, const char *value,
{
if
(
*
conf
->
variable
!=
newval
)
{
record
->
status
|=
GUC_PENDING_RESTART
;
ereport
(
elevel
,
(
errcode
(
ERRCODE_CANT_CHANGE_RUNTIME_PARAM
),
errmsg
(
"parameter
\"
%s
\"
cannot be changed without restarting the server"
,
name
)));
return
0
;
}
record
->
status
&=
~
GUC_PENDING_RESTART
;
return
-
1
;
}
...
...
@@ -6015,12 +6017,14 @@ set_config_option(const char *name, const char *value,
{
if
(
*
conf
->
variable
!=
newval
)
{
record
->
status
|=
GUC_PENDING_RESTART
;
ereport
(
elevel
,
(
errcode
(
ERRCODE_CANT_CHANGE_RUNTIME_PARAM
),
errmsg
(
"parameter
\"
%s
\"
cannot be changed without restarting the server"
,
name
)));
return
0
;
}
record
->
status
&=
~
GUC_PENDING_RESTART
;
return
-
1
;
}
...
...
@@ -6103,12 +6107,14 @@ set_config_option(const char *name, const char *value,
{
if
(
*
conf
->
variable
!=
newval
)
{
record
->
status
|=
GUC_PENDING_RESTART
;
ereport
(
elevel
,
(
errcode
(
ERRCODE_CANT_CHANGE_RUNTIME_PARAM
),
errmsg
(
"parameter
\"
%s
\"
cannot be changed without restarting the server"
,
name
)));
return
0
;
}
record
->
status
&=
~
GUC_PENDING_RESTART
;
return
-
1
;
}
...
...
@@ -6209,12 +6215,14 @@ set_config_option(const char *name, const char *value,
if
(
*
conf
->
variable
==
NULL
||
newval
==
NULL
||
strcmp
(
*
conf
->
variable
,
newval
)
!=
0
)
{
record
->
status
|=
GUC_PENDING_RESTART
;
ereport
(
elevel
,
(
errcode
(
ERRCODE_CANT_CHANGE_RUNTIME_PARAM
),
errmsg
(
"parameter
\"
%s
\"
cannot be changed without restarting the server"
,
name
)));
return
0
;
}
record
->
status
&=
~
GUC_PENDING_RESTART
;
return
-
1
;
}
...
...
@@ -6302,12 +6310,14 @@ set_config_option(const char *name, const char *value,
{
if
(
*
conf
->
variable
!=
newval
)
{
record
->
status
|=
GUC_PENDING_RESTART
;
ereport
(
elevel
,
(
errcode
(
ERRCODE_CANT_CHANGE_RUNTIME_PARAM
),
errmsg
(
"parameter
\"
%s
\"
cannot be changed without restarting the server"
,
name
)));
return
0
;
}
record
->
status
&=
~
GUC_PENDING_RESTART
;
return
-
1
;
}
...
...
@@ -8009,6 +8019,8 @@ GetConfigOptionByNum(int varnum, const char **values, bool *noshow)
values
[
14
]
=
NULL
;
values
[
15
]
=
NULL
;
}
values
[
16
]
=
(
conf
->
status
&
GUC_PENDING_RESTART
)
?
"t"
:
"f"
;
}
/*
...
...
@@ -8044,7 +8056,7 @@ show_config_by_name(PG_FUNCTION_ARGS)
* show_all_settings - equiv to SHOW ALL command but implemented as
* a Table Function.
*/
#define NUM_PG_SETTINGS_ATTS 1
6
#define NUM_PG_SETTINGS_ATTS 1
7
Datum
show_all_settings
(
PG_FUNCTION_ARGS
)
...
...
@@ -8104,6 +8116,8 @@ show_all_settings(PG_FUNCTION_ARGS)
TEXTOID
,
-
1
,
0
);
TupleDescInitEntry
(
tupdesc
,
(
AttrNumber
)
16
,
"sourceline"
,
INT4OID
,
-
1
,
0
);
TupleDescInitEntry
(
tupdesc
,
(
AttrNumber
)
17
,
"pending_restart"
,
BOOLOID
,
-
1
,
0
);
/*
* Generate attribute metadata needed later to produce tuples from raw
...
...
src/include/catalog/catversion.h
View file @
a486e357
...
...
@@ -53,6 +53,6 @@
*/
/* yyyymmddN */
#define CATALOG_VERSION_NO 2015051
2
1
#define CATALOG_VERSION_NO 2015051
4
1
#endif
src/include/catalog/pg_proc.h
View file @
a486e357
...
...
@@ -3067,7 +3067,7 @@ DATA(insert OID = 2077 ( current_setting PGNSP PGUID 12 1 0 0 0 f f f f t f s 1
DESCR
(
"SHOW X as a function"
);
DATA
(
insert
OID
=
2078
(
set_config
PGNSP
PGUID
12
1
0
0
0
f
f
f
f
f
f
v
3
0
25
"25 25 16"
_null_
_null_
_null_
_null_
_null_
set_config_by_name
_null_
_null_
_null_
));
DESCR
(
"SET X as a function"
);
DATA
(
insert
OID
=
2084
(
pg_show_all_settings
PGNSP
PGUID
12
1
1000
0
0
f
f
f
f
t
t
s
0
0
2249
""
"{25,25,25,25,25,25,25,25,25,25,25,1009,25,25,25,23
}"
"{o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o}"
"{name,setting,unit,category,short_desc,extra_desc,context,vartype,source,min_val,max_val,enumvals,boot_val,reset_val,sourcefile,sourceline
}"
_null_
_null_
show_all_settings
_null_
_null_
_null_
));
DATA
(
insert
OID
=
2084
(
pg_show_all_settings
PGNSP
PGUID
12
1
1000
0
0
f
f
f
f
t
t
s
0
0
2249
""
"{25,25,25,25,25,25,25,25,25,25,25,1009,25,25,25,23
,16}"
"{o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o}"
"{name,setting,unit,category,short_desc,extra_desc,context,vartype,source,min_val,max_val,enumvals,boot_val,reset_val,sourcefile,sourceline,pending_restart
}"
_null_
_null_
show_all_settings
_null_
_null_
_null_
));
DESCR
(
"SHOW ALL as a function"
);
DATA
(
insert
OID
=
3329
(
pg_show_all_file_settings
PGNSP
PGUID
12
1
1000
0
0
f
f
f
f
t
t
s
0
0
2249
""
"{25,23,23,25,25}"
"{o,o,o,o,o}"
"{sourcefile,sourceline,seqno,name,setting}"
_null_
_null_
show_all_file_settings
_null_
_null_
_null_
));
DESCR
(
"show config file settings"
);
...
...
src/include/utils/guc_tables.h
View file @
a486e357
...
...
@@ -167,6 +167,7 @@ struct config_generic
* Caution: the GUC_IS_IN_FILE bit is transient state for ProcessConfigFile.
* Do not assume that its value represents useful information elsewhere.
*/
#define GUC_PENDING_RESTART 0x0002
/* GUC records for specific variable types */
...
...
src/test/regress/expected/rules.out
View file @
a486e357
...
...
@@ -1616,8 +1616,9 @@ pg_settings| SELECT a.name,
a.boot_val,
a.reset_val,
a.sourcefile,
a.sourceline
FROM pg_show_all_settings() a(name, setting, unit, category, short_desc, extra_desc, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, sourcefile, sourceline);
a.sourceline,
a.pending_restart
FROM pg_show_all_settings() a(name, setting, unit, category, short_desc, extra_desc, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, sourcefile, sourceline, pending_restart);
pg_shadow| SELECT pg_authid.rolname AS usename,
pg_authid.oid AS usesysid,
pg_authid.rolcreatedb AS usecreatedb,
...
...
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