Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable wal heartbeats by default #2217

Merged
merged 2 commits into from
Nov 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions flow/peerdbenv/dynamicconf.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,14 @@ var DynamicSettings = [...]*protos.DynamicSetting{
{
Name: "PEERDB_ENABLE_WAL_HEARTBEAT",
Description: "Enables WAL heartbeat to prevent replication slot lag from increasing during times of no activity",
DefaultValue: "false",
DefaultValue: "true",
ValueType: protos.DynconfValueType_BOOL,
ApplyMode: protos.DynconfApplyMode_APPLY_MODE_IMMEDIATE,
TargetForSetting: protos.DynconfTarget_ALL,
},
{
Name: "PEERDB_WAL_HEARTBEAT_QUERY",
DefaultValue: `BEGIN;
DROP AGGREGATE IF EXISTS PEERDB_EPHEMERAL_HEARTBEAT(float4);
CREATE AGGREGATE PEERDB_EPHEMERAL_HEARTBEAT(float4) (SFUNC = float4pl, STYPE = float4);
DROP AGGREGATE PEERDB_EPHEMERAL_HEARTBEAT(float4); END;`,
Name: "PEERDB_WAL_HEARTBEAT_QUERY",
DefaultValue: "SELECT pg_logical_emit_message(false,'peerdb_heartbeat','')",
ValueType: protos.DynconfValueType_STRING,
Description: "SQL to run during each WAL heartbeat",
ApplyMode: protos.DynconfApplyMode_APPLY_MODE_IMMEDIATE,
Expand Down
Loading