バージョンごとのドキュメント一覧

21.5. 定義済みロール #

<title>Predefined Roles</title>

<productname>PostgreSQL</productname> provides a set of predefined roles that provide access to certain, commonly needed, privileged capabilities and information. Administrators (including roles that have the <literal>CREATEROLE</literal> privilege) can <command>GRANT</command> these roles to users and/or other roles in their environment, providing those users with access to the specified capabilities and information. For example: 《マッチ度[92.626728]》PostgreSQLでは、ある種の共通に必要で、特権のある機能や情報にアクセスできるよう、いくつかのあらかじめ定義されたロールを提供しています。 (CREATEROLE権限を持つロールを含む)管理者は自分の環境のユーザあるいはロールに対し、これらのロールをGRANT(付与)することで、それらのユーザに、その機能や情報を提供することができます。

GRANT pg_signal_backend TO admin_user;

警告

Care should be taken when granting these roles to ensure they are only used where needed and with the understanding that these roles grant access to privileged information. 《マッチ度[96.511628]》これらのロールを許可する場合は、必要な場合にのみ、これらのロールは機密情報へのアクセス権を与えることを理解して、使用されるように注意する必要があります。

The predefined roles are described below. Note that the specific permissions for each of the roles may change in the future as additional capabilities are added. Administrators should monitor the release notes for changes. 《マッチ度[76.126126]》定義済みロールについてはで説明します。 それぞれのロールの個別の権限については、将来、さらなる機能が追加されるに連れて変更されるかもしれないことに注意してください。 管理者は、変更がないかリリースノートを確認するようにしてください。 《機械翻訳》事前定義済のロールは次のとおりです。 ノートでは、将来、機能が追加されるにつれて、各ロールの特定の権限が変更される可能性があります。 管理者は、変更のためにリリースノートをモニタする必要があります。

pg_checkpoint #

<literal>pg_checkpoint</literal> allows executing the <link linkend="sql-checkpoint"><command>CHECKPOINT</command></link> command. 《マッチ度[60.000000]》CHECKPOINTコマンドの実行を許可する 《機械翻訳》pg_checkpointは、CHECKPOINTコマンドの実行を許可します。

pg_create_subscription #

<literal>pg_create_subscription</literal> allows users with <literal>CREATE</literal> permission on the database to issue <link linkend="sql-createsubscription"><command>CREATE SUBSCRIPTION</command></link>. 《マッチ度[70.531401]》CREATE SUBSCRIPTIONを実行するために、ユーザに対してデータベースへのCREATE権限を許可する 《機械翻訳》pg_create_subscriptionは、CREATEデータベースのパーミッションを持つユーザがCREATE SUBSCRIPTIONを発行できるようにします。

pg_database_owner #

<literal>pg_database_owner</literal> always has exactly one implicit member: the current database owner. It cannot be granted membership in any role, and no role can be granted membership in <literal>pg_database_owner</literal>. However, like any other role, it can own objects and receive grants of access privileges. Consequently, once <literal>pg_database_owner</literal> has rights within a template database, each owner of a database instantiated from that template will possess those rights. Initially, this role owns the <literal>public</literal> schema, so each database owner governs local use of that schema. 《マッチ度[52.912621]》pg_database_ownerロールには暗黙で状況に依存したメンバが1つあります。すなわち、現在のデータベースの所有者です。 他のロールと同様に、オブジェクトを所有したり、アクセス権限の許可を受けたりすることができます。 したがって、pg_database_ownerがテンプレートデータベース内で権限を一度持てば、そのテンプレートから作成されたデータベースの所有者は皆、その権限を行使します。 pg_database_ownerは他のロールのメンバにはなれませんし、暗黙でないメンバも持てません。 最初に、このロールはpublicスキーマを所有していますので、各データベース所有者はそのスキーマのローカルでの利用を管理します。 《機械翻訳》pg_database_owner暗黙のメンバは常に1つのみです。 現在データベース所有者です。 どのロールでもメンバシップを付与することはできず、どのロールもpg_database_ownerでメンバシップを付与することはできません。 ただし、他のロールと同様に、オブジェクトを所有し、アクセス権限の付与を受けることができます。 したがって、pg_database_ownerテンプレートデータベース内で権利を持つと、そのテンプレートからインスタンス化されたデータベースの各所有者がそれらの権利を所有します。 最初は、このロールがpublicスキーマを所有しているため、各データベース所有者がそのスキーマのローカルの使用を管理します。

pg_maintain #

<literal>pg_maintain</literal> allows executing <link linkend="sql-vacuum"><command>VACUUM</command></link>, <link linkend="sql-analyze"><command>ANALYZE</command></link>, <link linkend="sql-cluster"><command>CLUSTER</command></link>, <link linkend="sql-refreshmaterializedview"><command>REFRESH MATERIALIZED VIEW</command></link>, <link linkend="sql-reindex"><command>REINDEX</command></link>, and <link linkend="sql-lock"><command>LOCK TABLE</command></link> on all relations, as if having <literal>MAINTAIN</literal> rights on those objects. 《マッチ度[76.470588]》すべてのリレーションに対してVACUUMANALYZECLUSTERREFRESH MATERIALIZED VIEWREINDEXおよびLOCK TABLEを実行することを許可します。明示的に許可されていなくても、これらのオブジェクトに対してMAINTAIN権限があるかのように実行できます。 《機械翻訳》pg_maintainを使用すると、すべてのリレーションに対してVACUUMANALYZECLUSTERREFRESH MATERIALIZED VIEWREINDEXLOCK TABLEを、これらのオブジェクトにMAINTAINがあるかのように実行できます。

pg_monitor
pg_read_all_settings
pg_read_all_stats
pg_stat_scan_tables #

These roles are intended to allow administrators to easily configure a role for the purpose of monitoring the database server. They grant a set of common privileges allowing the role to read various useful configuration settings, statistics, and other system information normally restricted to superusers. 《機械翻訳》これらのロールは、管理者がロールを監視する目的でデータベースサーバを簡単に設定できるようにすることを目的としています。 これらのロールは、通常はスーパーユーザに制限されているさまざまな便利な設定設定、統計処理、およびその他のロール情報をシステムが読み取ることを可能にする一連の共通権限を付与します。

<literal>pg_monitor</literal> allows reading/executing various monitoring views and functions. This role is a member of <literal>pg_read_all_settings</literal>, <literal>pg_read_all_stats</literal> and <literal>pg_stat_scan_tables</literal>. 《マッチ度[71.369295]》各種の監視ビューや機能を読み取り/実行する。 このロールは、pg_read_all_settingspg_read_all_statsおよびpg_stat_scan_tablesのメンバです。 《機械翻訳》pg_monitorさまざまな監視ビューおよび関数の読み取り/実行を許可します。 このロールはpg_read_all_settingspg_read_all_statsおよびpg_stat_scan_tablesのメンバです。

<literal>pg_read_all_settings</literal> allows reading all configuration variables, even those normally visible only to superusers. 《マッチ度[53.435115]》通常スーパーユーザのみが読み取れる、全ての設定変数を読み取る 《機械翻訳》pg_read_all_settingsにより、通常はスーパーユーザのみに設定される変数も含め、全ての可視変数を読み込むことができます。

<literal>pg_read_all_stats</literal> allows reading all pg_stat_* views and use various statistics related extensions, even those normally visible only to superusers. 《マッチ度[64.457831]》通常スーパーユーザのみが読み取れる、すべてのpg_stat_*ビューを読み取り、各種の統計関連のエクステンションを使用する 《機械翻訳》pg_read_all_stats全てのpg_stat_*ビューを読み込むことができ、また、通常はスーパーユーザのみに統計処理されるものも含め、様々な可視関連の拡張を使用することができます。

<literal>pg_stat_scan_tables</literal> allows executing monitoring functions that may take <literal>ACCESS SHARE</literal> locks on tables, potentially for a long time (e.g., <function>pgrowlocks(text)</function> in the <xref linkend="pgrowlocks"/> extension). 《機械翻訳》pg_stat_scan_tablesを使用すると、テーブルのACCESS SHAREロックを取る可能性のあるアクセス関数を、潜在的に長時間実行することができます(例えばpgrowlocks(text)pgrowlocksextensionで)。

pg_read_all_data
pg_write_all_data #

<literal>pg_read_all_data</literal> allows reading all data (tables, views, sequences), as if having <command>SELECT</command> rights on those objects and <literal>USAGE</literal> rights on all schemas. This role does not bypass row-level security (RLS) policies. If RLS is being used, an administrator may wish to set <literal>BYPASSRLS</literal> on roles which this role is granted to. 《マッチ度[51.162791]》それらのオブジェクトに対するSELECT権限を持っていて、明示的に持っていなかったとしてもすべてのスキーマに対してUSAGE権限を持っているかのように、すべてのデータ(テーブル、ビュー、シーケンス)を読み取る。 このロールにはロール属性BYPASSRLSは設定されていません。 RLSが使われているのであれば、管理者はこのロールがGRANTされるロールに対してBYPASSRLSを設定したいと思うかもしれません。 《機械翻訳》pg_read_all_dataこれらのオブジェクトに対する権限とUSAGEすべてのスキーマに対する権限を持つかのように、すべてのデータ(テーブル、ビュー、シーケンス)を読み取ることができます。 このロールは、バイパス行-レベルセキュリティ(RLS)ポリシーを持ちません。 RLSが使用されている場合、管理者はBYPASSRLSこのロールが付与されているロールにを設定することができます。 SELECT

<literal>pg_write_all_data</literal> allows writing all data (tables, views, sequences), as if having <command>INSERT</command>, <command>UPDATE</command>, and <command>DELETE</command> rights on those objects and <literal>USAGE</literal> rights on all schemas. This role does not bypass row-level security (RLS) policies. If RLS is being used, an administrator may wish to set <literal>BYPASSRLS</literal> on roles which this role is granted to. 《マッチ度[55.829596]》それらのオブジェクトに対するINSERTUPDATEおよびDELETE権限を持っていて、明示的に持っていなかったとしてもすべてのスキーマに対してUSAGE権限を持っているかのように、すべてのデータ(テーブル、ビュー、シーケンス)に書き込む。 このロールにはロール属性BYPASSRLSは設定されていません。 RLSが使われているのであれば、管理者はこのロールがGRANTされるロールに対してBYPASSRLSを設定したいと思うかもしれません。 《機械翻訳》pg_write_all_dataは、すべてのデータ(テーブル、ビュー、シーケンス)を、INSERTUPDATE、およびDELETEこれらのオブジェクトに対する権限とUSAGEすべてのスキーマに対する権限を持つかのように記述できます。 このロールは、バイパス行-レベルセキュリティ(RLS)ポリシーを持ちません。 RLSが使用されている場合、管理者はBYPASSRLSこのロールが付与されているロールに対して設定することができます。

pg_read_server_files
pg_write_server_files
pg_execute_server_program #

These roles are intended to allow administrators to have trusted, but non-superuser, roles which are able to access files and run programs on the database server as the user the database runs as. They bypass all database-level permission checks when accessing files directly and they could be used to gain superuser-level access. Therefore, great care should be taken when granting these roles to users. 《機械翻訳》これらの役割は、ファイルをトラステッドで実行し、スーパーユーザが実行するアクセスとしてデータベースサーバでプログラムを実行できる、データベースではなくユーザの役割を管理者が持つことを目的としています。 これらはすべてデータベースをバイパスします。 レベルパーミッションは、アクセスファイルを直接チェックし、スーパーユーザレベルアクセスを取得するために使用される可能性があります。 したがって、これらの役割をユーザに付与するときは、十分に注意する必要があります。

<literal>pg_read_server_files</literal> allows reading files from any location the database can access on the server using <command>COPY</command> and other file-access functions. 《マッチ度[60.335196]》COPYやその他のファイルアクセス関数で、データベースがサーバ上でアクセスできる任意の場所からファイルを読み取ることを許可する 《機械翻訳》pg_read_server_filesを使用すると、COPYおよびその他のデータベース-アクセス機能を使用して、サーバのファイルアクセスのどの場所からでもファイルを読み取ることができます。

<literal>pg_write_server_files</literal> allows writing to files in any location the database can access on the server using <command>COPY</command> and other file-access functions. 《マッチ度[60.220994]》COPYやその他のファイルアクセス関数で、データベースがサーバ上でアクセスできる任意の場所にファイルを書き込むことを許可する 《機械翻訳》pg_write_server_files COPYおよびその他のデータベース-アクセス関数を使用して、サーバ上のファイルがアクセスできる任意の場所にファイルを書き込むことができます。

<literal>pg_execute_server_program</literal> allows executing programs on the database server as the user the database runs as using <command>COPY</command> and other functions which allow executing a server-side program. 《マッチ度[66.063348]》COPYやサーバ側のプログラムを実行できるその他の関数で、データベースを実行しているユーザとしてデータベースサーバ上でのプログラムの実行を許可する 《機械翻訳》pg_execute_server_programを使用すると、データベースサーバが使用しているユーザとしてデータベース上でプログラムを実行できますCOPYおよびサーバ側のプログラムを実行できるその他の関数も使用できます。

pg_signal_autovacuum_worker #

<literal>pg_signal_autovacuum_worker</literal> allows signaling autovacuum workers to cancel the current table's vacuum or terminate its session. See <xref linkend="functions-admin-signal"/>. 《機械翻訳》pg_signal_autovacuum_workerこの場合、信号を発信するオートバキューム就業者は現在テーブルのバキュームにキャンセルするか、セッションを終了できます。 「9.28.2」を参照してください。

pg_signal_backend #

<literal>pg_signal_backend</literal> allows signaling another backend to cancel a query or terminate its session. Note that this role does not permit signaling backends owned by a superuser. See <xref linkend="functions-admin-signal"/>. 《機械翻訳》pg_signal_backendでは、別のバックエンドに対して、問い合わせのキャンセルまたはそのセッションの終了をシグナリングできます。 このノートでは、ロールが所有するバックエンドのシグナリングは許可されません。 「9.28.2」を参照してください。 スーパーユーザ

pg_use_reserved_connections #

<literal>pg_use_reserved_connections</literal> allows use of connection slots reserved via <xref linkend="guc-reserved-connections"/>. 《マッチ度[55.970149]》reserved_connectionsによって予約済みの接続スロットの使用を許可する 《機械翻訳》pg_use_reserved_connectionsreserved_connections経由のコネクション予約の利用が可能