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

Ack the WAL Keep-Alives #1905

Merged
merged 4 commits into from
Oct 31, 2024
Merged

Ack the WAL Keep-Alives #1905

merged 4 commits into from
Oct 31, 2024

Conversation

robacourt
Copy link
Contributor

@robacourt robacourt commented Oct 29, 2024

Acknowledge the WAL on keep-alive messages to keep advancing it.

Relevant Discord thread

Copy link

netlify bot commented Oct 30, 2024

Deploy Preview for electric-next ready!

Name Link
🔨 Latest commit 00e0da9
🔍 Latest deploy log https://app.netlify.com/sites/electric-next/deploys/672248f347d1b2000801c46e
😎 Deploy Preview https://deploy-preview-1905--electric-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@msfstef
Copy link
Contributor

msfstef commented Oct 30, 2024

Linking to a relevant article - in AWS RDS there are heartbeats written to the DB every 5 minutes that make the WAL grow very quickly.

I think it makes sense to flush on keep alive messages in order to avoid this happening and this shouldn't mess with our logic in any way. A second set of eyes more familiar with PG would be good (@icehaunter?), but I this might resolve the issue.

We could be smarter about when we ack the WAL in the keep alive if there are performance implications on doing it every time, but I suspect this is already better than letting it grow indefinitely.

@msfstef msfstef marked this pull request as ready for review October 30, 2024 16:18
@balegas
Copy link
Contributor

balegas commented Oct 30, 2024

Our past experience: #1083

I think it makes sense to flush on keep alive messages in order to avoid this happening and this shouldn't mess with our logic in any way.

Can't see why not. Let's run this on RDS tomorrow and see what happens.

@icehaunter icehaunter merged commit b110ed9 into main Oct 31, 2024
23 checks passed
@icehaunter icehaunter deleted the rob/ack-keep-alives branch October 31, 2024 11:52
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.

4 participants