prevent order dependency if an extension is loaded or not#49681
prevent order dependency if an extension is loaded or not#49681KristofferC wants to merge 1 commit intomasterfrom
Conversation
vtjnash
left a comment
There was a problem hiding this comment.
The combination of statefullness seems awkward, since the conditionals are evaluated at such widely different points in time, against potentially entirely different environments. And then we don't even know if it needs to load that, just that it is a trigger of it
|
I agree, I must say liked the first implementation of extension loading more (before #48513) where the check of all the triggers happened in one instant. But after some discussion with @topolarity, I think we should be able to remove this condition and allow extensions to be loaded even in this case which would remove this failure mode. |
|
The trouble with that one was it was re-happening constantly, instead of only at one instant. Preferably, it seems we need to find the right middle ground where it checks the is-now-loaded condition only once (when it loads), but re-checks the is-all--deps-in-environment every time that condition might have changed. |
|
I'm gonna close this in favour of #49701 where this failure mode doesn't exist anymore. |
Fixes ##49656
There were two issues:
gid.ntriggers -= 1when inserting extension triggers happened unconditionally but needs to be consistent with theextid.ntriggers -= 1in the extension callbacks.extid.ntriggers += 1that happened when a trigger could not be loaded doesn't make sense to me. If such a trigger is loaded we will never load the extension and there should never be a reason to bump this value.cc @topolarity