From 9632798dc530c40c84162c283d3cf3bff0f7ac37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCrkan=20=C4=B0ndibay?= Date: Mon, 29 Jan 2024 16:32:54 +0300 Subject: [PATCH] Update src/backend/distributed/commands/utility_hook.c Co-authored-by: Onur Tirtir --- src/backend/distributed/commands/utility_hook.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/backend/distributed/commands/utility_hook.c b/src/backend/distributed/commands/utility_hook.c index dcd582120..cd5eea9e4 100644 --- a/src/backend/distributed/commands/utility_hook.c +++ b/src/backend/distributed/commands/utility_hook.c @@ -96,14 +96,19 @@ "SELECT citus_internal.mark_object_distributed(%d, %s, %d, %s)" /* - * TwoPcStatementInfo is used to determine whether a statement is supported in 2PC - * and whether it should be marked as distributed in 2PC. + * NonMainDbDistributedStatementInfo is used to determine whether a statement is + * supported from non-main databases and whether it should be marked as + * distributed explicitly (*). + * + * We always have to mark such the objects created "as distributed" but while for + * some object types we can delegate this to main database, for some others we have + * to explicitly send a command to all nodes in this code-path to achieve this. */ -typedef struct TwoPcStatementInfo +typedef struct NonMainDbDistributedStatementInfo { int statementType; - bool markAsDistributed; -} TwoPcStatementInfo; + bool explicitlyMarkAsDistributed; +} NonMainDbDistributedStatementInfo; /* * twoPcSupportedStatements is a list of statements that are supported in 2PC.