Skip to content

Commit

Permalink
documentation fix related to PostgreSQL v12
Browse files Browse the repository at this point in the history
issue #810
  • Loading branch information
kaigai committed Oct 20, 2024
1 parent 6ce5675 commit 8179282
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 92 deletions.
20 changes: 0 additions & 20 deletions docs/gpucache/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -184,26 +184,6 @@ <h2 id="configuration">Configuration</h2>
execute function pgstrom.gpucache_sync_trigger();
=# alter table dpoints_even enable always trigger row_sync;
</code></pre>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Additional configuration at PostgreSQL v12 or prior.</p>
<p>In case when GPU Cache is used at PostgreSQL v12 or prior, you need to configure
an additional BEFORE TRUNCATE statement trigger that executes <code>pgstrom.gpucache_sync_trigger()</code> function.
If you want to use the GPU Cache on the replication slave, </p>
<p>If you use GPU Cache at the PostgreSQL v12 or prior, in a similar way, invocation mode of this trigger must have <code>ALWAYS</code>.</p>
<p>PostgreSQL v13 enhanced its object-access-hook mechanism, so allows extension modules
to capture execution of TRUNCATE without triggers configuration.
On the other hand, the prior version still needs the BEFORE TRUNCATE statement trigger to keep consistency
of GPU Cache by capture of TRUNCATE.</p>
</div>
<p>Below is an example to configure GPU Cache on the <code>dpoints</code> table at PostgreSQL v12 or prior.</p>
<pre><code>=# create trigger row_sync after insert or update or delete on dpoints_even for row
execute function pgstrom.gpucache_sync_trigger();
=# create trigger stmt_sync before truncate on dpoints_even for statement
execute function pgstrom.gpucache_sync_trigger();
=# alter table dpoints_even enable always trigger row_sync;
=# alter table dpoints_even enable always trigger stmt_sync;
</code></pre>
<h3 id="gpu-cache-customize">GPU Cache Customize</h3>
<p>You can customize GPU Cache by specifying an optional string in the form of KEY=VALUE as an argument to GPU Cache line trigger. Please note that where you should specify is not to the syntax trigger.
The following SQL statement is an example of creating a GPU Cache whose maximum row count is 2.5 million rows and the size of the REDO Log Buffer is 100MB.</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -250,5 +250,5 @@ <h2 id="support-policy">Support Policy</h2>

<!--
MkDocs version : 1.6.0
Build Date UTC : 2024-10-20 15:26:27.023263+00:00
Build Date UTC : 2024-10-20 15:36:20.099540+00:00
-->
20 changes: 0 additions & 20 deletions docs/ja/gpucache/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -184,26 +184,6 @@ <h2 id="_3">設定</h2>
execute function pgstrom.gpucache_sync_trigger();
=# alter table dpoints_even enable always trigger row_sync;
</code></pre>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>PostgreSQL v12.x 以前のバージョンにおける追加設定</p>
<p>PostgreSQL v12および以前のバージョンでGPUキャッシュを利用する場合、上記のトリガに加えて、
<code>pgstrom.gpucache_sync_trigger()</code>関数を実行するBEFORE TRUNCATEの構文トリガの設定が必要です。</p>
<p>レプリケーションのスレーブ側でGPUキャッシュを実行する場合、同様に、このトリガの発行モードが
<code>ALWAYS</code>である事が必要です。</p>
<p>PostgreSQL v13ではObject Access Hookが拡張され、拡張モジュールはトリガ設定なしで
TRUNCATEの実行を捕捉できるようになりました。
しかしそれ以前のバージョンでは、TRUNCATEを捕捉してGPUキャッシュの一貫性を保つには、
BEFORE TRUNCATEの構文トリガが必要です。</p>
</div>
<p>以下は、PostgreSQL v12以前でGPUキャッシュを<code>dpoints</code>テーブルに設定する例です。</p>
<pre><code>=# create trigger row_sync after insert or update or delete on dpoints_even for row
execute function pgstrom.gpucache_sync_trigger();
=# create trigger stmt_sync before truncate on dpoints_even for statement
execute function pgstrom.gpucache_sync_trigger();
=# alter table dpoints_even enable always trigger row_sync;
=# alter table dpoints_even enable always trigger stmt_sync;
</code></pre>
<h3 id="gpu_1">GPUキャッシュのカスタマイズ</h3>
<p>GPUキャッシュの行トリガに引数として KEY=VALUE 形式のオプション文字列を与える事で、GPUキャッシュをカスタマイズする事ができます。
構文トリガの方ではありませんのでご注意ください。</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/ja/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -242,5 +242,5 @@ <h2 id="_6">サポートポリシー</h2>

<!--
MkDocs version : 1.6.0
Build Date UTC : 2024-10-20 15:26:27.583638+00:00
Build Date UTC : 2024-10-20 15:36:20.661170+00:00
-->
2 changes: 1 addition & 1 deletion docs/ja/search/search_index.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/search/search_index.json

Large diffs are not rendered by default.

48 changes: 0 additions & 48 deletions man/gpucache.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,54 +111,6 @@ Below is an example to configure GPU Cache on the `dpoints` table.
=# alter table dpoints_even enable always trigger row_sync;
```

@ja{
!!! Note
PostgreSQL v12.x 以前のバージョンにおける追加設定

PostgreSQL v12および以前のバージョンでGPUキャッシュを利用する場合、上記のトリガに加えて、
`pgstrom.gpucache_sync_trigger()`関数を実行するBEFORE TRUNCATEの構文トリガの設定が必要です。

レプリケーションのスレーブ側でGPUキャッシュを実行する場合、同様に、このトリガの発行モードが
`ALWAYS`である事が必要です。

PostgreSQL v13ではObject Access Hookが拡張され、拡張モジュールはトリガ設定なしで
TRUNCATEの実行を捕捉できるようになりました。
しかしそれ以前のバージョンでは、TRUNCATEを捕捉してGPUキャッシュの一貫性を保つには、
BEFORE TRUNCATEの構文トリガが必要です。
}
@en{
!!! Note
Additional configuration at PostgreSQL v12 or prior.

In case when GPU Cache is used at PostgreSQL v12 or prior, you need to configure
an additional BEFORE TRUNCATE statement trigger that executes `pgstrom.gpucache_sync_trigger()` function.
If you want to use the GPU Cache on the replication slave,

If you use GPU Cache at the PostgreSQL v12 or prior, in a similar way, invocation mode of this trigger must have `ALWAYS`.

PostgreSQL v13 enhanced its object-access-hook mechanism, so allows extension modules
to capture execution of TRUNCATE without triggers configuration.
On the other hand, the prior version still needs the BEFORE TRUNCATE statement trigger to keep consistency
of GPU Cache by capture of TRUNCATE.
}

@ja{
以下は、PostgreSQL v12以前でGPUキャッシュを`dpoints`テーブルに設定する例です。
}
@en{
Below is an example to configure GPU Cache on the `dpoints` table at PostgreSQL v12 or prior.
}

```
=# create trigger row_sync after insert or update or delete on dpoints_even for row
execute function pgstrom.gpucache_sync_trigger();
=# create trigger stmt_sync before truncate on dpoints_even for statement
execute function pgstrom.gpucache_sync_trigger();
=# alter table dpoints_even enable always trigger row_sync;
=# alter table dpoints_even enable always trigger stmt_sync;
```


@ja:###GPUキャッシュのカスタマイズ
@en:###GPU Cache Customize

Expand Down

0 comments on commit 8179282

Please sign in to comment.