Skip to content

Latest commit

 

History

History
74 lines (46 loc) · 3.81 KB

20240329_01.md

File metadata and controls

74 lines (46 loc) · 3.81 KB

PostgreSQL 17 preview - allow_alter_system GUC控制 是否允许alter system 修改postgresql.auto.conf

作者

digoal

日期

2024-03-29

标签

PostgreSQL , PolarDB , DuckDB , allow_alter_system


背景

通过在postgresql.conf参数文件中配置allow_alter_system控制是否允许alter system 修改postgresql.auto.conf.

主要目的是配合一些数据库外部管理工具的使用, 避免参数被数据库superuser通过alter system修改带来的一些不安定因素.

allow_alter_system = on  

https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=d3ae2a24f265a028f4b9e8df79ea7b075c6cf016

Add allow_alter_system GUC. master github/master  
author	Robert Haas <rhaas@postgresql.org>	  
Fri, 29 Mar 2024 12:44:45 +0000 (08:44 -0400)  
committer	Robert Haas <rhaas@postgresql.org>	  
Fri, 29 Mar 2024 12:45:11 +0000 (08:45 -0400)  
commit	d3ae2a24f265a028f4b9e8df79ea7b075c6cf016  
tree	821da445f3c814a50ca560105f33be84f2a3435d	tree  
parent	0075d78947e3800c5a807f48fd901f16db91101b	commit | diff  
Add allow_alter_system GUC.  
  
This is marked PGC_SIGHUP, so it can only be set in a configuration  
file, not anywhere else; and it is also marked GUC_DISALLOW_IN_AUTO_FILE,  
so it can't be set using ALTER SYSTEM. When set to false, the  
ALTER SYSTEM command is disallowed.  
  
There was considerable concern that this would be misinterpreted as  
a security feature, which it is not, because a determined superuser  
has various ways of bypassing it. Hence, a lot of work has gone into  
wordsmithing the documentation, in the hopes of avoiding any such  
confusion.  
  
Jelte Fennemia-Nio and Gabriele Bartolini, with wording suggestions  
for the documentation from many others.  
  
Discussion: http://postgr.es/m/CA%2BVUV5rEKt2%2BCdC_KUaPoihMu%2Bi5ChT4WVNTr4CD5-xXZUfuQw%40mail.gmail.com  

digoal's wechat