This is a document for PGroonga 2.X. See PGroonga 1.x document when you're using old PGroonga.

pgroonga_crash_safer module

Since 2.3.3.

This is still an experimental feature.


pgroonga_crash_safer module provides crash safe features:

pgroonga_crash_safer module starts the auto recovery process when any PGroonga feature is used for the first time after PostgreSQL's crash. Note that it's not started on PostgreSQL startup. If you want to run the auto recovery process on PostgreSQL startup, you can execute simple SQL that uses PGroonga feature such as SELECT pgroonga_command('status') immediately after PostgreSQL started.

Note that you need to set pgroonga.enable_crash_safe parameter to on to use pgroonga_crash_safer module.


You must configure the following parameters to use pgroonga_crash_safer module:

For example:

shared_preload_libraries = 'pgroonga_crash_safer'
pgroonga.enable_crash_safer = on

You may need to increase max_worker_processes parameter value. pgroonga_crash_safer module always runs 1 worker process. And pgroonga_crash_safer module runs 1 or 2 worker processes per database that uses PGroonga. For example, if you have 3 databases that use PGroonga, pgroonga_crash_safer module runs up to 7 worker processes:

max_worker_processes = 15 # 8 (the default) + 7 (for pgroonga_crash_safer)


See also