Rename pg_checkpointer predefined role to pg_checkpoint.
authorRobert Haas <[email protected]>
Tue, 5 Jul 2022 17:31:42 +0000 (13:31 -0400)
committerRobert Haas <[email protected]>
Tue, 5 Jul 2022 17:31:42 +0000 (13:31 -0400)
This is more consistent with how other predefined roles that confer
specific privileges are named.

Nathan Bosart

Discussion: http://postgr.es/m/CA+TgmoatH7+yYe+A8uJFNogg3VUDtFE6c-77yHAY8TRWR7oqyw@mail.gmail.com

doc/src/sgml/ref/checkpoint.sgml
doc/src/sgml/user-manag.sgml
src/backend/tcop/utility.c
src/include/catalog/catversion.h
src/include/catalog/pg_authid.dat

index 1cebc03d15e0c0852351bf36dc0c651ba52ed8ca..28a1d717b87eb28fb8ff236cb8c3e8b890f8bf1d 100644 (file)
@@ -53,7 +53,7 @@ CHECKPOINT
 
   <para>
    Only superusers or users with the privileges of
-   the <link linkend="predefined-roles-table"><literal>pg_checkpointer</literal></link>
+   the <link linkend="predefined-roles-table"><literal>pg_checkpoint</literal></link>
    role can call <command>CHECKPOINT</command>.
   </para>
  </refsect1>
index 9067be1d9c7811d061ac87923e973ced73480f7c..6eaaaa36b881e249fda6675992ddf756477cb434 100644 (file)
@@ -583,7 +583,7 @@ DROP ROLE doomed_role;
        COPY and other functions which allow executing a server-side program.</entry>
       </row>
       <row>
-       <entry>pg_checkpointer</entry>
+       <entry>pg_checkpoint</entry>
        <entry>Allow executing
        the <link linkend="sql-checkpoint"><command>CHECKPOINT</command></link>
        command.</entry>
index 6a5bcded558d71e51baa62f5ad1c9512342f5a64..6b0a8652622b26887ea2ccd15ced3300e951c5dc 100644 (file)
@@ -947,10 +947,10 @@ standard_ProcessUtility(PlannedStmt *pstmt,
            break;
 
        case T_CheckPointStmt:
-           if (!has_privs_of_role(GetUserId(), ROLE_PG_CHECKPOINTER))
+           if (!has_privs_of_role(GetUserId(), ROLE_PG_CHECKPOINT))
                ereport(ERROR,
                        (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-                        errmsg("must be superuser or have privileges of pg_checkpointer to do CHECKPOINT")));
+                        errmsg("must be superuser or have privileges of pg_checkpoint to do CHECKPOINT")));
 
            RequestCheckpoint(CHECKPOINT_IMMEDIATE | CHECKPOINT_WAIT |
                              (RecoveryInProgress() ? 0 : CHECKPOINT_FORCE));
index eaa6109a1135a6cad36d3cd32503fdefc032d2bb..eed9bb4b3dc642e46dc6e07c8e37aa5a49c49926 100644 (file)
@@ -53,6 +53,6 @@
  */
 
 /*                         yyyymmddN */
-#define CATALOG_VERSION_NO 202207051
+#define CATALOG_VERSION_NO 202207052
 
 #endif
index 6c28119fa1a52de9ae22e337b7979a55fe9a3686..3343a69ddb0f315e4dd81550ba979903751b480f 100644 (file)
@@ -79,8 +79,8 @@
   rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
   rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',
   rolpassword => '_null_', rolvaliduntil => '_null_' },
-{ oid => '4544', oid_symbol => 'ROLE_PG_CHECKPOINTER',
-  rolname => 'pg_checkpointer', rolsuper => 'f', rolinherit => 't',
+{ oid => '4544', oid_symbol => 'ROLE_PG_CHECKPOINT',
+  rolname => 'pg_checkpoint', rolsuper => 'f', rolinherit => 't',
   rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
   rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',
   rolpassword => '_null_', rolvaliduntil => '_null_' },