-
-
Notifications
You must be signed in to change notification settings - Fork 91
smp server: improve counts management and expiration for postgres message store #1631
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
Conversation
| total_deleted BIGINT := 0; | ||
| BEGIN | ||
| FOR rid IN | ||
| SELECT recipient_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implicit cursor here is:
- bad for large tables
- disrupted with commits.
Instead batching is used
| del_count := delete_expired_msgs(rid, old_ts); | ||
| total_deleted := total_deleted + del_count; | ||
| EXCEPTION WHEN OTHERS THEN | ||
| ROLLBACK; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rollback is automatic here, but commit that would release lock is not, so explicit commit is still neded
91d9950 to
d9287d4
Compare
…sage store (#1631) * smp server: improve counts management and expiration for postgres message store * one update * fix expiration
No description provided.