Load configuration in post_parse_analyze hook #3
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Hello,
During testing, I found a corner case issue. If the first query executed on the cluster after a restart is a DROP TABLE of a partitionned table, it'll fail because the configuration will be loaded after the effective drop, but with the pathman_config table not up to date.
This commit moves the load_config() call to post_parse_analyze hook, which is also called for utility statement. If the overhead of calling a hook for every query just for this purpose is too much, ProcessUtility hook could be used instead, but the load_config() call would be duplicated. Let me know what you prefer.
Regards