The PostgreSQL Recovery Kit provides tunable environment variables to help customize resource protection in certain scenarios. To change the values of these variables, edit the file /etc/default/LifeKeeper. No processes need to be restarted for the new settings to take effect. The default values will work for most environments where the PostgreSQL Recovery Kit will be installed.

LKPGSQL_CONN_RETRIES

This tunable controls the amount of time the PostgreSQL Recovery Kit will wait for the database to start. The amount of time is calculated by the Recovery Kit using the following formula: (LKPGSQL_CONN_RETRIES* 5) = total time in seconds to wait for a database instance to start. The setting of this variable affects both the resource in-service requests and the resource local recovery.

LKPGSQL_DISCONNECT_CLIENT

This tunable controls whether active clients will be disconnected in the event of a postmaster crash. When the value is set to 1 (true), active clients will be disconnected while resource local recovery is in progress. When the value is set to 0 (false), active clients will not be disconnected while resource local recovery is in progress. This variable affects only the resource local recovery events and is only applicable during local recovery events where the postmaster process is not running.

LKPGSQL_SDIRS

This tunable controls the client disconnect behavior when the PostgreSQL database is shut down. This comma separated tunable must be added to the defaults file. By setting this option, the specified resource instance or instances corresponding to the protected data directory will not force clients to disconnect during shutdown.

LKPGSQL_SDIRS=/protected/pgsql-datadir

LKPGSQL_SDIRS=/protected/pgsql-datadir,/otherprotected/pgsql-datadir

Where /protected/pgsql-datadir and /otherprotected/pgsql-datadir are the PostgreSQL data directories under LifeKeeper protection.

Note: The options LKPGSQL_SDIRS and LKPGSQL_IDIRS are exclusive. The value placed in the LKPGSQL_SDIRS or LKPGSQL_IDIRS tunable must match exactly with the protected datadir value selected during hierarchy creation.

LKPGSQL_IDIRS

This tunable controls the client disconnect behavior when the PostgreSQL database is shut down. This comma separated tunable must be added to the defaults file. By setting this option, the specified resource instance or instances corresponding to the protected data directory will force clients to do an immediate disconnect during shutdown.

LKPGSQL_IDIRS=/protected/pgsql-datadir

LKPGSQL_IDIRS=/protected/pgsql-datadir,/otherprotected/pgsql-datadir

Where /protected/pgsql-datadir and /otherprotected/pgsql-datadir are the PostgreSQL data directories under LifeKeeper protection.

Note: The options LKPGSQL_SDIRS and LKPGSQL_IDIRS are exclusive. The value placed in the LKPGSQL_SDIRS or LKPGSQL_IDIRS tunable must match exactly with the protected datadir value selected during hierarchy creation.

フィードバック

お役に立ちましたか?

はい いいえ
お役に立ちましたか
理由をお聞かせください
フィードバックありがとうございました

このトピックへフィードバック

送信