Skip to content

Commit

Permalink
Review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
emelsimsek committed Sep 4, 2023
1 parent 8904630 commit 0311dd4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/backend/distributed/metadata/metadata_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ static void CreateDistTableCache(void);
static void CreateShardIdCache(void);
static void CreateDistObjectCache(void);
static void InvalidateForeignRelationGraphCacheCallback(Datum argument, Oid relationId);
void InvalidateDistRelationCacheCallback(Datum argument, Oid relationId);
static void InvalidateNodeRelationCacheCallback(Datum argument, Oid relationId);
static void InvalidateLocalGroupIdRelationCacheCallback(Datum argument, Oid relationId);
static void InvalidateConnParamsCacheCallback(Datum argument, Oid relationId);
Expand Down
2 changes: 0 additions & 2 deletions src/backend/distributed/shared_library_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ CompressionTypeStr_type extern_CompressionTypeStr = NULL;
IsColumnarTableAmTable_type extern_IsColumnarTableAmTable = NULL;
ReadColumnarOptions_type extern_ReadColumnarOptions = NULL;

void InvalidateDistRelationCacheCallback(Datum argument, Oid relationId);

/*
* Define "pass-through" functions so that a SQL function defined as one of
* these symbols in the citus module can use the definition in the columnar
Expand Down
2 changes: 2 additions & 0 deletions src/include/distributed/metadata_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ typedef enum
ANY_CITUS_TABLE_TYPE
} CitusTableType;

void InvalidateDistRelationCacheCallback(Datum argument, Oid relationId);

extern List * AllCitusTableIds(void);
extern bool IsCitusTableType(Oid relationId, CitusTableType tableType);
extern CitusTableType GetCitusTableType(CitusTableCacheEntry *tableEntry);
Expand Down
7 changes: 3 additions & 4 deletions src/test/regress/citus_tests/test/test_extension.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import psycopg
import pytest


def test_create_drop_citus(coord):
Expand All @@ -8,13 +9,11 @@ def test_create_drop_citus(coord):
# and Conn2 cannot use it.
cur1.execute("DROP EXTENSION citus")

try:
cur2.execute("SELECT citus_version();")
with pytest.raises(psycopg.errors.UndefinedFunction):
# Conn1 dropped the extension. citus_version udf
# cannot be found.sycopg.errors.UndefinedFunction
# is expected here.
except psycopg.errors.UndefinedFunction:
cur2.execute("SELECT 1;")
cur2.execute("SELECT citus_version();")

# Conn2 creates the extension,
# Conn1 is able to use it immediadtely.
Expand Down

0 comments on commit 0311dd4

Please sign in to comment.