Skip to content

Commit 66543e7

Browse files
committed
[PGPRO-6538] Skip non-existing relations for Citus compatibility (issue #247)
1 parent 1daee0c commit 66543e7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/utility_stmt_hooking.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,11 @@ is_pathman_related_copy(Node *parsetree)
114114
(copy_stmt->is_from ?
115115
PATHMAN_COPY_WRITE_LOCK :
116116
PATHMAN_COPY_READ_LOCK),
117-
false);
117+
true);
118+
119+
/* Skip relation if it does not exist (for Citus compatibility) */
120+
if (!OidIsValid(parent_relid))
121+
return false;
118122

119123
/* Check that relation is partitioned */
120124
if (has_pathman_relation_info(parent_relid))

0 commit comments

Comments
 (0)