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 refresh materialized views with atomic swap #29

Open
mikicz opened this issue Jun 23, 2023 · 1 comment
Open

Enable refresh materialized views with atomic swap #29

mikicz opened this issue Jun 23, 2023 · 1 comment

Comments

@mikicz
Copy link
Collaborator

mikicz commented Jun 23, 2023

Add an option to refresh materialized views with an atomic swap. When the refresh starts, it would create a new materialized view (with some temp name), and when it is created, it would run an atomic deletion of the old materialized view, and renaming of the new view to the correct name.

This could reduce the number of vacuums PostgreSQL is doing. It may also allow the view to be created without using the concurrent flag, which should be faster.

@radusuciu
Copy link

This would be a great feature, especially for larger materialized views.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants