Skip to content

Commit

Permalink
Mark variable with PG_USED_FOR_ASSERTS_ONLY
Browse files Browse the repository at this point in the history
The function continuous_agg_migrate_to_time_bucket contains a variable
that is used only for asserts. This PR marks this variable as
PG_USED_FOR_ASSERTS_ONLY.
  • Loading branch information
jnidzwetzki committed Apr 26, 2024
1 parent f888991 commit e4846c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tsl/src/continuous_aggs/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,8 @@ continuous_agg_migrate_to_time_bucket(PG_FUNCTION_ARGS)
replace_time_bucket_function_in_catalog(cagg);

/* Fetch new CAgg definition from catalog */
ContinuousAgg *new_cagg_definition = cagg_get_by_relid_or_fail(cagg_relid);
ContinuousAgg PG_USED_FOR_ASSERTS_ONLY *new_cagg_definition =
cagg_get_by_relid_or_fail(cagg_relid);
Assert(new_cagg_definition->bucket_function->bucket_function == new_bucket_function);
Assert(cagg->bucket_function->bucket_time_origin ==
new_cagg_definition->bucket_function->bucket_time_origin);
Expand Down

0 comments on commit e4846c7

Please sign in to comment.