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
Replace materialized view of water by tables with diff update #853
Replace materialized view of water by tables with diff update #853
Conversation
Results evaluating commit 0751610 (merged with base e12f09a as d8eff8f). See run details. PostgreSQL DB size in MB: 2738 ⇒ 2738 (0.0% change)
expand for details...
|
2a2280b
to
320210d
Compare
a98b0eb
to
3d5bdb4
Compare
@frodrigo could you allow editing when submitting? Would make it a bit easier to upgrade to master in order to re-run with the new base. Use this checkbox when creating PRs. Thanks! |
It is done. |
@frodrigo are you sure the checkbox on the right side of this conversation is checked? I can't update your branch (which is what we have to do before merging) |
3d5bdb4
to
0751610
Compare
I rebased It. I don't know why, but the box does not keep the check. |
0751610
to
e9ce92a
Compare
Replacing materialized view by a tables with update from trigger on change only.
Start with the most simple cases.
Just replicate the change on:
osm_water_polygon
toosm_water_lakeline
,osm_water_polygon
toosm_water_point
.Use a view to factorize the
osm_water_lakeline
andosm_water_point_view
definition and reuse it in the trigger.The update of
osm_important_waterway_linestring
is more complex, as it is a merge ofosm_waterway_linestring
. It not done in the same way. At the end of the transaction we remove impacted and recompute them.The goal is to update more quickly the content of derivated table by just updating the changing content. It replaces the update of materialized view because their need a full recompute (with lock issue).
Note, an advanced version of differential update over materialized view as already implemented in the building cluster PR #725.
It addresses #814 and a part of #809.