The <filename>pg_logicalinspect</filename> module provides SQL functions
that allow you to inspect the contents of logical decoding components. It
allows the inspection of serialized logical snapshots of a running
<productname>PostgreSQL</productname> database cluster, which is useful
for debugging or educational purposes.
《機械翻訳》pg_logicalinspect
モジュールは、SQLコンポーネントの内容を検査できるロジカルデコーディング関数を提供します。
これにより、実行中のPostgreSQLロジカルのシリアル化されたデータベースクラスタスナップショットを検査できます。
これは、デバッグや教育目的に役立ちます。
By default, use of these functions is restricted to superusers and members of
the <literal>pg_read_server_files</literal> role. Access may be granted by
superusers to others using <command>GRANT</command>.
《機械翻訳》デフォルト別に見ると、これらの関数の使用はスーパーユーザに限定されています。
また、pg_read_server_files
メンバ.ロールを使用している他のユーザに対して、スーパーユーザはアクセスを付与することができます。
GRANT
pg_get_logical_snapshot_meta(filename text) returns record
#
Gets logical snapshot metadata about a snapshot file that is located in
the server's <filename>pg_logical/snapshots</filename> directory.
The <replaceable>filename</replaceable> argument represents the snapshot
file name.
For example:
《機械翻訳》snapshotのpg_logical/snapshots
ディレクトリにあるsnapshotメタデータについて、ロジカルサーバファイルを取得します。
filename
引数はsnapshotファイルの名前を表します。
例の場合は、次のようになります。
postgres=# SELECT * FROM pg_ls_logicalsnapdir(); -[ RECORD 1 ]+----------------------- name | 0-40796E18.snap size | 152 modification | 2024-08-14 16:36:32+00 postgres=# SELECT * FROM pg_get_logical_snapshot_meta('0-40796E18.snap'); -[ RECORD 1 ]-------- magic | 1369563137 checksum | 1028045905 version | 6 postgres=# SELECT ss.name, meta.* FROM pg_ls_logicalsnapdir() AS ss, pg_get_logical_snapshot_meta(ss.name) AS meta; -[ RECORD 1 ]------------- name | 0-40796E18.snap magic | 1369563137 checksum | 1028045905 version | 6
If <replaceable>filename</replaceable> does not match a snapshot file, the
function raises an error.
《機械翻訳》もしfilename
マッチがsnapshotファイルでなければ、関数はエラーを上げる。
pg_get_logical_snapshot_info(filename text) returns record
#
Gets logical snapshot information about a snapshot file that is located in
the server's <filename>pg_logical/snapshots</filename> directory.
The <replaceable>filename</replaceable> argument represents the snapshot
file name.
For example:
《機械翻訳》ロジカルのpg_logical/snapshots
ディレクトリにあるsnapshot snapshotに関するサーバファイル情報を取得します。
filename
引数はsnapshot・ファイルの名前を表します。
例の場合は、次のようになります。
postgres=# SELECT * FROM pg_ls_logicalsnapdir(); -[ RECORD 1 ]+----------------------- name | 0-40796E18.snap size | 152 modification | 2024-08-14 16:36:32+00 postgres=# SELECT * FROM pg_get_logical_snapshot_info('0-40796E18.snap'); -[ RECORD 1 ]------------+----------- state | consistent xmin | 751 xmax | 751 start_decoding_at | 0/40796AF8 two_phase_at | 0/40796AF8 initial_xmin_horizon | 0 building_full_snapshot | f in_slot_creation | f last_serialized_snapshot | 0/0 next_phase_at | 0 committed_count | 0 committed_xip | catchange_count | 2 catchange_xip | {751,752} postgres=# SELECT ss.name, info.* FROM pg_ls_logicalsnapdir() AS ss, pg_get_logical_snapshot_info(ss.name) AS info; -[ RECORD 1 ]------------+---------------- name | 0-40796E18.snap state | consistent xmin | 751 xmax | 751 start_decoding_at | 0/40796AF8 two_phase_at | 0/40796AF8 initial_xmin_horizon | 0 building_full_snapshot | f in_slot_creation | f last_serialized_snapshot | 0/0 next_phase_at | 0 committed_count | 0 committed_xip | catchange_count | 2 catchange_xip | {751,752}
If <replaceable>filename</replaceable> does not match a snapshot file, the
function raises an error.
《機械翻訳》もしfilename
マッチがsnapshotファイルでなければ、関数はエラーを上げる。