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

Add SendWALHeartbeat Method #462

Merged
merged 1 commit into from
Oct 2, 2023
Merged

Add SendWALHeartbeat Method #462

merged 1 commit into from
Oct 2, 2023

Conversation

iskakaushik
Copy link
Contributor

Implemented SendWALHeartbeat() method to maintain PostgreSQL WAL activity.

To ensure consistent WAL activity in idle PostgreSQL databases and prevent indefinite growth of replication slots, a heartbeat mechanism is introduced. This method generates WAL activity by creating and immediately dropping an aggregate function, ensuring a guaranteed and lightweight WAL entry without leaving persistent changes in the database schema. Using an aggregate was chosen for its guaranteed WAL generation and minimal impact.

fixes: #429

Implemented `SendWALHeartbeat()` method to maintain PostgreSQL WAL activity.

To ensure consistent WAL activity in idle PostgreSQL databases and prevent indefinite growth of replication slots, a heartbeat mechanism is introduced. This method generates WAL activity by creating and immediately dropping an aggregate function, ensuring a guaranteed and lightweight WAL entry without leaving persistent changes in the database schema. Using an aggregate was chosen for its guaranteed WAL generation and minimal impact.

fixes: #429
@iskakaushik iskakaushik merged commit bb9deb7 into main Oct 2, 2023
19 checks passed
@serprex serprex deleted the issue/429 branch July 19, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue heart beats during idle activity
2 participants