mirror of https://github.com/citusdata/citus.git
external funcs
parent
d157496513
commit
8b6f87614b
|
@ -19,8 +19,6 @@ DATA_built = $(generated_sql_files)
|
|||
|
||||
# directories with source files
|
||||
SUBDIRS = . commands connection ddl deparser executor metadata operations planner progress relay safeclib test transaction utils worker
|
||||
# columnar modules
|
||||
SUBDIRS += ../columnar
|
||||
# enterprise modules
|
||||
SUBDIRS +=
|
||||
|
||||
|
|
|
@ -360,6 +360,11 @@ _PG_init(void)
|
|||
*/
|
||||
load_file(COLUMNAR_LIB_NAME, false);
|
||||
|
||||
/*
|
||||
* Now, acquire symbols from columnar module. First, acquire
|
||||
* the address of the set options hook, and set it so that we
|
||||
* can propagate options changes.
|
||||
*/
|
||||
ColumnarTableSetOptions_hook_type **ColumnarTableSetOptions_hook_ptr =
|
||||
(ColumnarTableSetOptions_hook_type **) find_rendezvous_variable(
|
||||
"ColumnarTableSetOptions_hook");
|
||||
|
@ -368,11 +373,34 @@ _PG_init(void)
|
|||
Assert(ColumnarTableSetOptions_hook_ptr != NULL);
|
||||
Assert(*ColumnarTableSetOptions_hook_ptr != NULL);
|
||||
|
||||
/*
|
||||
* Set the hook, so that when the options change on a columnar
|
||||
* table, we propagate the changes to shards.
|
||||
*/
|
||||
**ColumnarTableSetOptions_hook_ptr = ColumnarTableSetOptionsHook;
|
||||
|
||||
/*
|
||||
* Next, acquire symbols for columnar functions that citus
|
||||
* needs to call.
|
||||
*/
|
||||
void *handle = NULL;
|
||||
ColumnarSupportsIndexAM = (ColumnarSupportsIndexAM_type)
|
||||
load_external_function(COLUMNAR_LIB_NAME, "ColumnarSupportsIndexAM",
|
||||
true, &handle);
|
||||
CompressionTypeStr = (CompressionTypeStr_type)
|
||||
load_external_function(COLUMNAR_LIB_NAME, "CompressionTypeStr",
|
||||
true, &handle);
|
||||
IsColumnarAmTable = (IsColumnarAmTable_type)
|
||||
load_external_function(COLUMNAR_LIB_NAME, "IsColumnarAmTable",
|
||||
true, &handle);
|
||||
ReadColumnarOptions = (ReadColumnarOptions_type)
|
||||
load_external_function(COLUMNAR_LIB_NAME, "ReadColumnarOptions",
|
||||
true, &handle);
|
||||
|
||||
/*
|
||||
* Finally, acquire symbols the "pass through" to columnar so
|
||||
* that a SQL function declared on the citus module can be
|
||||
* defined in the columnar module. This helps with the upgrade
|
||||
* transition, where some columnar functions
|
||||
* (e.g. columnar_handler) are declared in SQL to be in the
|
||||
* citus module.
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
#ifndef SHARED_LIBRARY_INIT_H
|
||||
#define SHARED_LIBRARY_INIT_H
|
||||
|
||||
#include "columnar/columnar.h"
|
||||
|
||||
#define GUC_STANDARD 0
|
||||
#define MAX_SHARD_COUNT 64000
|
||||
#define MAX_SHARD_REPLICATION_FACTOR 100
|
||||
|
|
Loading…
Reference in New Issue