mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-25 07:40:48 +08:00
REFRESH MATERIALIZED VIEW statements sometimes crash because the generated plan has a HashAgg node instead of a Partial Aggregate node when executing INSERT INTO <materialization_table> SELECT * FROM <view> Where the view stmt itself is along these lines SELECT time_bucket('1 day'::interval, cpu."time") , ...... _timescaledb_internal.partialize_agg(avg(...)) FROM <table>
15 lines
475 B
C
15 lines
475 B
C
/*
|
|
* This file and its contents are licensed under the Apache License 2.0.
|
|
* Please see the included NOTICE for copyright information and
|
|
* LICENSE-APACHE for a copy of the license.
|
|
*/
|
|
#ifndef TIMESCALEDB_PLAN_PARTIALIZE_H
|
|
#define TIMESCALEDB_PLAN_PARTIALIZE_H
|
|
#include <postgres.h>
|
|
#include <optimizer/planner.h>
|
|
|
|
bool ts_plan_process_partialize_agg(PlannerInfo *root, RelOptInfo *input_rel,
|
|
RelOptInfo *output_rel);
|
|
|
|
#endif /* TIMESCALEDB_PLAN_PARTIALIZE_H */
|