• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

bgw_policy/H03-May-2022-2,9212,192

compression/H03-May-2022-8,5606,435

continuous_aggs/H03-May-2022-6,3244,414

fdw/H03-May-2022-9,0685,378

nodes/H03-May-2022-8,8815,930

remote/H03-May-2022-10,8847,403

README.module.mdH A D02-Dec-20211.9 KiB3626

build-defs.cmakeH A D03-May-20222.2 KiB5848

chunk.cH A D02-Dec-202111.2 KiB405292

chunk.hH A D02-Dec-2021704 2011

chunk_api.cH A D02-Dec-202151.8 KiB1,7561,296

chunk_api.hH A D02-Dec-20211.1 KiB3019

chunk_copy.cH A D02-Dec-202129.6 KiB1,003699

chunk_copy.hH A D02-Dec-2021485 146

data_node.cH A D02-Dec-202148 KiB1,5931,167

data_node.hH A D02-Dec-20212.1 KiB5335

debug.cH A D02-Dec-202116.7 KiB678541

debug.hH A D02-Dec-2021581 2213

deparse.cH A D02-Dec-202126.6 KiB1,006729

deparse.hH A D02-Dec-20211.4 KiB5540

dist_backup.cH A D02-Dec-20216.3 KiB199142

dist_backup.hH A D02-Dec-2021400 145

dist_util.cH A D02-Dec-202112.4 KiB430324

dist_util.hH A D02-Dec-20211.4 KiB4328

hypertable.cH A D02-Dec-20219 KiB284202

hypertable.hH A D02-Dec-2021891 2412

init.cH A D02-Dec-202110.1 KiB270216

partialize_finalize.cH A D02-Dec-202121.1 KiB588408

partialize_finalize.hH A D02-Dec-2021570 2210

planner.cH A D02-Dec-20219.9 KiB325214

planner.hH A D02-Dec-20211,004 2515

process_utility.cH A D02-Dec-20213.1 KiB133108

process_utility.hH A D02-Dec-2021783 2111

reorder.cH A D02-Dec-202139.6 KiB1,240737

reorder.hH A D02-Dec-2021725 2111

telemetry.cH A D02-Dec-20212.2 KiB6749

telemetry.hH A D02-Dec-2021414 156

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