Skip to content

Commit fbbbf4b

Browse files
committed
check layout compatibility between AppendPath and MergeAppendPath
1 parent 9476927 commit fbbbf4b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/hooks.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,16 @@ pathman_rel_pathlist_hook(PlannerInfo *root, RelOptInfo *rel, Index rti, RangeTb
365365
ppi, paramsel);
366366
else if (IsA(cur_path, MergeAppendPath) &&
367367
pg_pathman_enable_runtime_merge_append)
368+
{
369+
/* Check struct layout compatibility */
370+
if (offsetof(AppendPath, subpaths) !=
371+
offsetof(MergeAppendPath, subpaths))
372+
elog(FATAL, "Struct layouts of AppendPath and "
373+
"MergeAppendPath differ");
374+
368375
inner_path = create_runtimemergeappend_path(root, cur_path,
369376
ppi, paramsel);
377+
}
370378

371379
if (inner_path)
372380
add_path(rel, inner_path);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy