Rename pg_checkpointer predefined role to pg_checkpoint.

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
This commit is contained in:
Robert Haas 2022-07-05 13:31:42 -04:00
parent 09878cdd48
commit b9eb0ff09e
5 changed files with 7 additions and 7 deletions

View File

@ -53,7 +53,7 @@ CHECKPOINT
<para> <para>
Only superusers or users with the privileges of 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>. role can call <command>CHECKPOINT</command>.
</para> </para>
</refsect1> </refsect1>

View File

@ -583,7 +583,7 @@ DROP ROLE doomed_role;
COPY and other functions which allow executing a server-side program.</entry> COPY and other functions which allow executing a server-side program.</entry>
</row> </row>
<row> <row>
<entry>pg_checkpointer</entry> <entry>pg_checkpoint</entry>
<entry>Allow executing <entry>Allow executing
the <link linkend="sql-checkpoint"><command>CHECKPOINT</command></link> the <link linkend="sql-checkpoint"><command>CHECKPOINT</command></link>
command.</entry> command.</entry>

View File

@ -947,10 +947,10 @@ standard_ProcessUtility(PlannedStmt *pstmt,
break; break;
case T_CheckPointStmt: case T_CheckPointStmt:
if (!has_privs_of_role(GetUserId(), ROLE_PG_CHECKPOINTER)) if (!has_privs_of_role(GetUserId(), ROLE_PG_CHECKPOINT))
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), (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 | RequestCheckpoint(CHECKPOINT_IMMEDIATE | CHECKPOINT_WAIT |
(RecoveryInProgress() ? 0 : CHECKPOINT_FORCE)); (RecoveryInProgress() ? 0 : CHECKPOINT_FORCE));

View File

@ -53,6 +53,6 @@
*/ */
/* yyyymmddN */ /* yyyymmddN */
#define CATALOG_VERSION_NO 202207051 #define CATALOG_VERSION_NO 202207052
#endif #endif

View File

@ -79,8 +79,8 @@
rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f', rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1', rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',
rolpassword => '_null_', rolvaliduntil => '_null_' }, rolpassword => '_null_', rolvaliduntil => '_null_' },
{ oid => '4544', oid_symbol => 'ROLE_PG_CHECKPOINTER', { oid => '4544', oid_symbol => 'ROLE_PG_CHECKPOINT',
rolname => 'pg_checkpointer', rolsuper => 'f', rolinherit => 't', rolname => 'pg_checkpoint', rolsuper => 'f', rolinherit => 't',
rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f', rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1', rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',
rolpassword => '_null_', rolvaliduntil => '_null_' }, rolpassword => '_null_', rolvaliduntil => '_null_' },