Skip to content

Commit

Permalink
Don't invalidate relation cache if cagg watermark constify is false
Browse files Browse the repository at this point in the history
It is not necessary to invalidate the relation cache during the
watermark update if the GUC `enable_cagg_watermark_constify=false`. Was
a leftover when the feature was introduced by #6325.
  • Loading branch information
fabriziomello committed Dec 2, 2024
1 parent 089a830 commit 05b986a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ts_catalog/continuous_aggs_watermark.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <utils/snapmgr.h>

#include "debug_point.h"
#include "guc.h"
#include "hypertable.h"
#include "ts_catalog/continuous_agg.h"
#include "ts_catalog/continuous_aggs_watermark.h"
Expand Down Expand Up @@ -321,8 +322,10 @@ ts_cagg_watermark_update(Hypertable *mat_ht, int64 watermark, bool watermark_isn

/* If we have a real-time CAgg, it uses a watermark function. So, we have to invalidate the rel
* cache to force a replanning of prepared statements. See cagg_watermark_update_internal for
* more information. */
bool invalidate_rel_cache = !cagg->data.materialized_only;
* more information. If the GUC enable_cagg_watermark_constify=false then it's not necessary
* to invalidate relation cache. */
bool invalidate_rel_cache =
!cagg->data.materialized_only && ts_guc_enable_cagg_watermark_constify;

watermark = cagg_compute_watermark(cagg, watermark, watermark_isnull);
cagg_watermark_update_internal(mat_ht->fd.id,
Expand Down

0 comments on commit 05b986a

Please sign in to comment.