Skip to content

Commit e999b86

Browse files
committed
Merge branch 'master' into pg_pathman_intro
2 parents 9dd0807 + fbbbf4b commit e999b86

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

src/hooks.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,16 @@ pathman_rel_pathlist_hook(PlannerInfo *root, RelOptInfo *rel, Index rti, RangeTb
369369
ppi, paramsel);
370370
else if (IsA(cur_path, MergeAppendPath) &&
371371
pg_pathman_enable_runtime_merge_append)
372+
{
373+
/* Check struct layout compatibility */
374+
if (offsetof(AppendPath, subpaths) !=
375+
offsetof(MergeAppendPath, subpaths))
376+
elog(FATAL, "Struct layouts of AppendPath and "
377+
"MergeAppendPath differ");
378+
372379
inner_path = create_runtimemergeappend_path(root, cur_path,
373380
ppi, paramsel);
381+
}
374382

375383
if (inner_path)
376384
add_path(rel, inner_path);

src/nodes_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ get_partitioned_attr_clauses(List *restrictinfo_list,
259259
Index partitioned_rel)
260260
{
261261
#define AdjustAttno(attno) \
262-
( (AttrNumber) (part_attno + FirstLowInvalidHeapAttributeNumber) )
262+
( (AttrNumber) (attno + FirstLowInvalidHeapAttributeNumber) )
263263

264264
List *result = NIL;
265265
ListCell *l;

src/pg_pathman.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,7 @@ append_child_relation(PlannerInfo *root, RelOptInfo *rel, Index rti,
497497
/* Recalc parent relation tuples count */
498498
rel->tuples += childrel->tuples;
499499

500+
/* Close child relations, but keep locks */
500501
heap_close(newrelation, NoLock);
501502

502503

0 commit comments

Comments
 (0)