Skip to content

Commit

Permalink
Enable wal heartbeats by default (#2217)
Browse files Browse the repository at this point in the history
users predating PG14 should change the query or disable wal heartbeats
  • Loading branch information
serprex authored Nov 14, 2024
1 parent 1ce7723 commit 350686f
Showing 1 changed file with 3 additions and 6 deletions.
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

0 comments on commit 350686f

Please sign in to comment.