-
Notifications
You must be signed in to change notification settings - Fork 125
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 FIXME about redundant param from 'ivm_visible_in_prestate' call. #578
Conversation
At first glance, i did get the neediness of this parameter. The visibility of tuple on QE does not depend on segment id, only on exported snapshot. So, this is clearly unneeded. But... why IVM test are not failing on this? This got me some more digging in CBDB internals, I actually think all this code is simply dead code for Cloudberry. Prestate visibility in IVM is something that matters when multiple relation are modified via SINGLE statement. I don't think we can even do this in Cloudberry: 1) Multiple write CTE are not possible, because there could be only one writer gang. Ref: apache@bfcb788 2) After statement are also prohibited, I get 'Triggers for statements are not yet supported.' error with them. Are there any other way for multiple relation modification in PostgreSQL that works for GP/CBDB? And, yes, even when this will (if even) be supported, gpseg id is anyway redundant.
Actuality, I'm looking forward to fix this one day. This may be helpful for our projections work. I will maybe tell more about this later in separate thread. |
Also, we need to delete 4th arg from here https://github.com/cloudberrydb/cloudberrydb/blob/main/src/include/catalog/pg_proc.dat#L12509 |
+ERROR: function pg_catalog.ivm_visible_in_prestate(oid, tid, oid) does not exist |
Nothing except confusion of its existence |
Hmm, tests actually failing... need to investigate further... |
So, okay. I was 100 % sure I tested UDF with multiple modification, but turns out I wasn't. This seem to be only case where ivm_visible_in_prestate used. However, all my objections remains true, so i added FIXME about this issue to fix it in the future. Also, debug print statement was added, because it will be really helpful for development purposes IMO. |
OK, you may need change commit comments. |
It is better to rewrite final commit message when Squash & merge PR. I always do it this way in my projects. This way we preserve dev history (we avoid force-pushed, which needed to alter commit msg), which may be useful. Final commit message may look like this:
|
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.
LGTM
Have a try with rules or triggers? |
AFTER STATEMENT triggers are not supported. But |
At first glance, i did get the neediness of this parameter. The visibility of tuple on QE does not depend on segment id, only on exported snapshot. So, this is clearly unneeded. But... why IVM test are not failing on this? This got me some more digging in CBDB internals, I actually think all this code is simply dead code for Cloudberry.
Prestate visibility in IVM is something that matters when multiple relation are modified via SINGLE statement. I don't think we can do this in Cloudberry:
Are there any other way for multiple relation modification in PostgreSQL that works for GP/CBDB?
And, yes, even when this will (if ever) be supported, gpseg id is anyway redundant.