tx_metadata_sync
Onder Kalaci 2022-11-29 11:44:18 +01:00
parent 5200c977ea
commit 2907a1f93c
2 changed files with 9 additions and 5 deletions

View File

@ -219,14 +219,11 @@ PreprocessDropTableStmt(Node *node, const char *queryString,
* table is a distributed table, this function errors out, as we currently don't * table is a distributed table, this function errors out, as we currently don't
* support local tables inheriting a distributed table. * support local tables inheriting a distributed table.
*/ */
#include "utils/inval.h"
void void
PostprocessCreateTableStmt(CreateStmt *createStatement, const char *queryString) PostprocessCreateTableStmt(CreateStmt *createStatement, const char *queryString)
{ {
if (!IsCoordinator())
{
CacheInvalidateRelcacheAll();
}
PostprocessCreateTableStmtForeignKeys(createStatement); PostprocessCreateTableStmtForeignKeys(createStatement);
if (createStatement->inhRelations != NIL) if (createStatement->inhRelations != NIL)

View File

@ -721,6 +721,13 @@ ProcessUtilityInternal(PlannedStmt *pstmt,
PreprocessAlterExtensionCitusStmtForCitusColumnar(parsetree); PreprocessAlterExtensionCitusStmtForCitusColumnar(parsetree);
} }
#include "utils/inval.h"
if (IsA(parsetree, CreateStmt) && !IsCoordinator())
{
CacheInvalidateRelcacheAll();
}
PrevProcessUtility_compat(pstmt, queryString, false, context, PrevProcessUtility_compat(pstmt, queryString, false, context,
params, queryEnv, dest, completionTag); params, queryEnv, dest, completionTag);