|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 03-May-2022 | - |
| bgw_policy/ | H | 03-May-2022 | - | 2,921 | 2,192 |
| compression/ | H | 03-May-2022 | - | 8,560 | 6,435 |
| continuous_aggs/ | H | 03-May-2022 | - | 6,324 | 4,414 |
| fdw/ | H | 03-May-2022 | - | 9,068 | 5,378 |
| nodes/ | H | 03-May-2022 | - | 8,881 | 5,930 |
| remote/ | H | 03-May-2022 | - | 10,884 | 7,403 |
| README.module.md | H A D | 02-Dec-2021 | 1.9 KiB | 36 | 26 |
| build-defs.cmake | H A D | 03-May-2022 | 2.2 KiB | 58 | 48 |
| chunk.c | H A D | 02-Dec-2021 | 11.2 KiB | 405 | 292 |
| chunk.h | H A D | 02-Dec-2021 | 704 | 20 | 11 |
| chunk_api.c | H A D | 02-Dec-2021 | 51.8 KiB | 1,756 | 1,296 |
| chunk_api.h | H A D | 02-Dec-2021 | 1.1 KiB | 30 | 19 |
| chunk_copy.c | H A D | 02-Dec-2021 | 29.6 KiB | 1,003 | 699 |
| chunk_copy.h | H A D | 02-Dec-2021 | 485 | 14 | 6 |
| data_node.c | H A D | 02-Dec-2021 | 48 KiB | 1,593 | 1,167 |
| data_node.h | H A D | 02-Dec-2021 | 2.1 KiB | 53 | 35 |
| debug.c | H A D | 02-Dec-2021 | 16.7 KiB | 678 | 541 |
| debug.h | H A D | 02-Dec-2021 | 581 | 22 | 13 |
| deparse.c | H A D | 02-Dec-2021 | 26.6 KiB | 1,006 | 729 |
| deparse.h | H A D | 02-Dec-2021 | 1.4 KiB | 55 | 40 |
| dist_backup.c | H A D | 02-Dec-2021 | 6.3 KiB | 199 | 142 |
| dist_backup.h | H A D | 02-Dec-2021 | 400 | 14 | 5 |
| dist_util.c | H A D | 02-Dec-2021 | 12.4 KiB | 430 | 324 |
| dist_util.h | H A D | 02-Dec-2021 | 1.4 KiB | 43 | 28 |
| hypertable.c | H A D | 02-Dec-2021 | 9 KiB | 284 | 202 |
| hypertable.h | H A D | 02-Dec-2021 | 891 | 24 | 12 |
| init.c | H A D | 02-Dec-2021 | 10.1 KiB | 270 | 216 |
| partialize_finalize.c | H A D | 02-Dec-2021 | 21.1 KiB | 588 | 408 |
| partialize_finalize.h | H A D | 02-Dec-2021 | 570 | 22 | 10 |
| planner.c | H A D | 02-Dec-2021 | 9.9 KiB | 325 | 214 |
| planner.h | H A D | 02-Dec-2021 | 1,004 | 25 | 15 |
| process_utility.c | H A D | 02-Dec-2021 | 3.1 KiB | 133 | 108 |
| process_utility.h | H A D | 02-Dec-2021 | 783 | 21 | 11 |
| reorder.c | H A D | 02-Dec-2021 | 39.6 KiB | 1,240 | 737 |
| reorder.h | H A D | 02-Dec-2021 | 725 | 21 | 11 |
| telemetry.c | H A D | 02-Dec-2021 | 2.2 KiB | 67 | 49 |
| telemetry.h | H A D | 02-Dec-2021 | 414 | 15 | 6 |
README.module.md
1# Submodule Licensing and Initialization #
2
3## Loading and Activation ##
4
5We link module loading and activation to the license GUC itself.
6We have a single GUC, the license, and load submodules based on
7what capabilities the license enables, i.e., an `apache` license-key does
8not load this module, while `timescale` key does. This
9ensures that the loader "does the right thing" with respect to the license, and
10a user cannot accidentally activate features they aren't licensed to use.
11
12The actual loading and activation is done through `check` and `assign` hooks on
13the license GUC. On `check` we validate the license type
14and on `assign` we set the capabilities-struct in this module,
15if needed. The `check` and `assign` functions can be found in
16[`license_guc.c/h`](/src/license_guc.c) in the Apache-Licensed src.
17
18### Cross License Functions ###
19
20To enable binaries which only contain Apache-Licensed code,
21we dynamically link in Timescale-Licensed code on license activation,
22and handle all function calls into the module via function pointers.
23
24The registry in `ts_cm_functions` of type `CrossModuleFunctions` (declared in
25[`cross_module_fn.h`](/src/cross_module_fn.h) and defined in
26[`cross_module_fn.c`](/src/cross_module_fn.c)) stores all of the cross-module
27functions.
28
29To add a new cross-module function you must:
30
31 - Add a struct member `CrossModuleFunctions.<function name>`.
32 - Add default function to `ts_cm_functions_default` that will be called from the Apache version, usually this function should just call `error_no_default_fn`. **NOTE** Due to function-pointer casting rules, the default function must have the exact same signature as the function pointer; you may _not_ cast another function pointer of another type.
33 - Add the overriding function to `tsl_cm_functions`in `init.c` in this module.
34
35To call a cross-module functions use `ts_cm_functions-><function name>(args)`.
36