-
Notifications
You must be signed in to change notification settings - Fork 23
Use correct way to detect SPI inner query #1972
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
Conversation
|
Usually when porting existing commits we use |
|
Okay, fair. Then at least mention the original author in the description as a co-author (example). Also, the patch description should be line-wrapped to 80 characters, see the wiki article on patch formatting. |
|
Updated description. |
557967e
Unfortunately, this doesn't work. Cherry-picking of this commit ito 7-th branch produces conflict. Resolving this conflict in favor of cherry-picking code makes autovaccuum tests hang. |
This comment was marked as resolved.
This comment was marked as resolved.
Yes. After revert of commit 9730a35 which is cherry-pick of ADBDEV-7415. There would be more than one conflicts without revert. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This reverts commit 9730a35.
Commit f8c4d53 changed detection of node to be SPI inter node, for use in metrics collection. However that commit used already_under_executor_run() to detect if the current node belongs to inner query. This function does not work for SPI exclusively, so some other nodes, like function called from the extension, were incorrectly marked as SPI_INNER_QUERY instead of being TOP_LEVEL_QUERY, which resulted in wrong metrics collection. This patch uses _SPI_connected counter to check the level of SPI, but marks all queries using SPI from interactive session as SPI_INNER_QUERY (f.e. queries using SPI from functions). Cherry-pick from dadbffb
557967e to
3692e03
Compare
Use correct way to detect SPI inner query.
Port fix for detection of SPI inner nodes from adb 6.x Previously we used
already_under_executor_run() to detect if the current node belongs to inner
query. This function does not work for SPI exclusively, so some other nodes,
like function called from the extension, were incorrectly marked as
SPI_INNER_QUERY instead of being TOP_LEVEL_QUERY, which resulted in wrong
metrics collection.
This patch uses _SPI_connected counter to check the level of SPI, but marks all
queries using SPI from interactive session as SPI_INNER_QUERY (f.e. queries
using SPI from functions).
This is a port of commit dadbffb for adb-6.
Co-Authored-By: Denis Kovalev [email protected]