Skip to content
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 missing elog(DEBUG2,...) after refactoring #7575

Conversation

fabriziomello
Copy link
Contributor

In #7505 we refactored the materialization code but the debugging query was removed by accident.

Disable-check: force-changelog-file
Disable-check: approval-count

@fabriziomello fabriziomello added continuous_aggregate tech-debt Needs refactoring and improvement tasks related to the source code and its architecture. labels Jan 7, 2025
@fabriziomello fabriziomello self-assigned this Jan 7, 2025
In timescale#7505 we refactored the materialization code but the debugging query
was removed by accident.

Disable-check: force-changelog-file
Disable-check: approval-count
@fabriziomello fabriziomello force-pushed the cagg_debug_query_on_materialization branch from debb73c to d9a5a5a Compare January 7, 2025 18:37
@fabriziomello fabriziomello enabled auto-merge (rebase) January 7, 2025 18:37
@fabriziomello fabriziomello merged commit fd676f5 into timescale:main Jan 7, 2025
47 checks passed
@@ -633,6 +633,7 @@ create_materialization_plan(MaterializationContext *context, MaterializationPlan
char *query = materialization->create_statement(context);
Oid types[] = { context->materialization_range.type, context->materialization_range.type };

elog(DEBUG2, "%s: %s", __func__, query);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a macro TS_DEBUG_LOG for these kinds of situations. It will be removed for release builds, so that we do not laden the server for debug printouts unnecessarily.

Copy link
Contributor Author

@fabriziomello fabriziomello Jan 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sometimes I need this DEBUG2 for debugging production materialization queries produced by our refresh cagg code (specially on SDCs). And actually we had it already before the refactoring, just bringing it back to the new code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is needed for debugging production code, then TS_DEBUG_LOG should not be used. Agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
continuous_aggregate tech-debt Needs refactoring and improvement tasks related to the source code and its architecture.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants