mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-16 10:33:27 +08:00
Adjust copy code to PG14 changes
PG14 changes initialization of ResultRelInfo, removes es_num_result_relations and changes es_result_relations into an array index by rangetable index. https://github.com/postgres/postgres/commit/1375422c78
This commit is contained in:
parent
d607e3d714
commit
78a21f412b
2
.github/workflows/postgres_dev.yaml
vendored
2
.github/workflows/postgres_dev.yaml
vendored
@ -10,7 +10,7 @@ jobs:
|
||||
PG_INSTALL_DIR: postgresql
|
||||
MAKE_JOBS: 2
|
||||
# postgres version to build against this can either be commit hash, branch or tag
|
||||
PG_COMMIT: 3d351d916b
|
||||
PG_COMMIT: 1375422
|
||||
CLANG: clang-9
|
||||
LLVM_CONFIG: llvm-config-9
|
||||
CC: gcc
|
||||
|
@ -241,8 +241,10 @@ copyfrom(CopyChunkState *ccstate, List *range_table, Hypertable *ht, void (*call
|
||||
|
||||
ExecOpenIndices(resultRelInfo, false);
|
||||
|
||||
#if PG14_LT
|
||||
estate->es_result_relations = resultRelInfo;
|
||||
estate->es_num_result_relations = 1;
|
||||
#endif
|
||||
estate->es_result_relation_info = resultRelInfo;
|
||||
estate->es_range_table = range_table;
|
||||
|
||||
@ -446,7 +448,12 @@ copyfrom(CopyChunkState *ccstate, List *range_table, Hypertable *ht, void (*call
|
||||
|
||||
ExecCloseIndices(resultRelInfo);
|
||||
/* Close any trigger target relations */
|
||||
#if PG14_LT
|
||||
ExecCleanUpTriggerState(estate);
|
||||
#else
|
||||
ExecCloseResultRelations(estate);
|
||||
ExecCloseRangeTableRelations(estate);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If we skipped writing WAL, then we need to sync the heap (but not
|
||||
|
@ -330,7 +330,8 @@ timescaledb_planner(Query *parse, int cursor_opts, ParamListInfo bound_params)
|
||||
{
|
||||
Plan *subplan = (Plan *) lfirst(lc);
|
||||
|
||||
ts_hypertable_insert_fixup_tlist(subplan);
|
||||
if (subplan)
|
||||
ts_hypertable_insert_fixup_tlist(subplan);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user