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

35.2. 実装機能 #

<title>Implementation Features</title>

The large object implementation breaks large objects up into <quote>chunks</quote> and stores the chunks in rows in the database. A B-tree index guarantees fast searches for the correct chunk number when doing random access reads and writes. ラージオブジェクトの実装では、ラージオブジェクトをチャンクに分割し、チャンクをデータベース内の行に格納しています。 B-treeインデックスは読み書き用のランダムアクセスに際して、正確なチャンク番号の高速検索を保証しています。

The chunks stored for a large object do not have to be contiguous. For example, if an application opens a new large object, seeks to offset 1000000, and writes a few bytes there, this does not result in allocation of 1000000 bytes worth of storage; only of chunks covering the range of data bytes actually written. A read operation will, however, read out zeroes for any unallocated locations preceding the last existing chunk. This corresponds to the common behavior of <quote>sparsely allocated</quote> files in <acronym>Unix</acronym> file systems. ラージオブジェクト用のチャンクは継続性を持ちません。 例えば、アプリケーションが新しくラージオブジェクトを開き、1000000オフセットにシークし、数バイトそこに書き出した場合、これは1000000バイトほどの格納領域が割り当てられることにはなりません。 データバイトの範囲に対応するチャンクのみが実際に書き出されます。 しかし読み取り操作は最後に存在するチャンクの前にある未割り当ての領域すべてとしてゼロを読み取ります。 これはUnixファイルシステムのスパース割り当てファイルの一般動作に一致します。

As of <productname>PostgreSQL</productname> 9.0, large objects have an owner and a set of access permissions, which can be managed using <xref linkend="sql-grant"/> and <xref linkend="sql-revoke"/>. <literal>SELECT</literal> privileges are required to read a large object, and <literal>UPDATE</literal> privileges are required to write or truncate it. Only the large object's owner (or a database superuser) can delete, comment on, or change the owner of a large object. To adjust this behavior for compatibility with prior releases, see the <xref linkend="guc-lo-compat-privileges"/> run-time parameter. PostgreSQL 9.0からラージオブジェクトは所有者およびアクセス権限を持ちます。 これはGRANTおよびREVOKEを使用して管理可能です。 ラージオブジェクトの読み取りにはSELECT権限が必要です。 また書き出し、切り詰めのためにはUPDATE権限が必要です。 ラージオブジェクトの所有者(またはデータベーススーパーユーザ)のみがラージオブジェクトの削除、コメント付け、所有者の変更が可能です。 過去のリリースとの互換性に関するこの動作を調整するためにはlo_compat_privileges実行時パラメータを参照してください。