From 1d2053a7e604cddf0216c93f92e192805a631d3a Mon Sep 17 00:00:00 2001 From: Daniel Gustafsson Date: Sat, 5 Sep 2026 20:31:12 +0200 Subject: [PATCH v1 2/5] doc: Add missing superuser note on online checksum functionn The documentation for the functions to enable and disable data checksums in a running cluster failed to mention that they are superuser only. The ACL in the procedure definition was also promising more than the implementation allowed so remove to match the strict superuser check in the functions. Found by Noah using AI assisted review with GPT. Backpatch to v19 where the online checksums feature was introduced. Reported-by: Noah Misch Discussion: https://postgr.es/m/... Backpatch-through: 19 --- doc/src/sgml/func/func-admin.sgml | 9 ++++++++- src/include/catalog/pg_proc.dat | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/func/func-admin.sgml b/doc/src/sgml/func/func-admin.sgml index 54eeb42e5bc..16e62a93acb 100644 --- a/doc/src/sgml/func/func-admin.sgml +++ b/doc/src/sgml/func/func-admin.sgml @@ -3128,7 +3128,8 @@ SELECT convert_from(pg_read_binary_file('file_in_utf8.txt'), 'UTF8'); The functions shown in can - be used to enable or disable data checksums in a running cluster. + be used to enable or disable data checksums in a running cluster. Use of + these functions is restricted to superusers. Changing data checksums can be done in a cluster with concurrent activity @@ -3175,6 +3176,9 @@ SELECT convert_from(pg_read_binary_file('file_in_utf8.txt'), 'UTF8'); specified, the process is throttled using the same principles as Cost-based Vacuum Delay. + + This function is restricted to superusers. + @@ -3193,6 +3197,9 @@ SELECT convert_from(pg_read_binary_file('file_in_utf8.txt'), 'UTF8'); stopped validating data checksums, the data checksum state will be set to off. + + This function is restricted to superusers. + diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat index 960763ee50b..a66cd1fe3f8 100644 --- a/src/include/catalog/pg_proc.dat +++ b/src/include/catalog/pg_proc.dat @@ -12477,7 +12477,7 @@ prorettype => 'void', proargtypes => 'int4 int4', proallargtypes => '{int4,int4}', proargmodes => '{i,i}', proargnames => '{cost_delay,cost_limit}', proargdefaults => '{0,100}', - prosrc => 'enable_data_checksums', proacl => '{POSTGRES=X}' }, + prosrc => 'enable_data_checksums' }, # collation management functions { oid => '3445', descr => 'import collations from operating system', -- 2.39.3 (Apple Git-146)