This is a document for PGroonga 2.X and 3.X. See PGroonga 1.x document when you're using old PGroonga.
pgroonga_standby_maintainer
moduleSince 2.4.2.
If PostgreSQL is 15 or higher, please use the pgroonga_wal_resource_manager
module instead of this module.
The pgroonga_standby_maintainer
module automatically executes the pgroonga_wal_apply()
function and the pgroonga_vacuum()
function on a stadnby database.
Normally PGroonga's WAL doesn't t apply on a standby database. If we use PGroonga with streaming replication.
Therefore, for example, a first "SELECT" on a primary database may become slower after we switch from a standby database. Because it takes time to apply PGroonga's WAL to the primary database.
In addition, we need to remove internal unused Groonga tables, columns and records periodically from the standby database with the pgroonga_vacuum()
function. Because VACUUM
isn't run on the standby database.
In the former case, we can apply PGroonga's WAL into the standby database automatically with the pgroonga_wal_applier
module. However, in the latter case, we can't execute automatically the pgroonga_vacuum()
funtion into the standby database.
We can execute automatically the pgroonga_wal_apply()
function and the pgroonga_vacuum()
function into the standby database with the pgroonga_standby_maintainer
module.
Therefore, if we use the pgroonga_standby_maintainer
module, we don't need to use the pgroonga_wal_applier
module and the pgroonga_vacuum()
function on the standby database.
We must configure the following parameters to use pgroonga_standby_maintainer
module:
An example:
shared_preload_libraries = 'pgroonga_standby_maintainer'