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

..03-May-2022-

README.mdH A D02-Dec-20212.2 KiB4440

data_node_chunk_assignment.cH A D02-Dec-20218.3 KiB301178

data_node_chunk_assignment.hH A D02-Dec-20212.3 KiB7345

data_node_scan_exec.cH A D02-Dec-20215 KiB178126

data_node_scan_exec.hH A D02-Dec-2021515 188

data_node_scan_plan.cH A D02-Dec-202122.9 KiB669394

data_node_scan_plan.hH A D02-Dec-2021728 2111

deparse.cH A D02-Dec-202185.5 KiB3,1341,856

deparse.hH A D02-Dec-20212.4 KiB6040

estimate.cH A D02-Dec-202112.7 KiB405221

estimate.hH A D02-Dec-2021580 189

fdw.cH A D02-Dec-202111.5 KiB417291

fdw.hH A D02-Dec-2021488 178

fdw_utils.cH A D02-Dec-20212.6 KiB12885

fdw_utils.hH A D02-Dec-2021650 2613

modify_exec.cH A D02-Dec-202116 KiB589363

modify_exec.hH A D02-Dec-20211.3 KiB3725

modify_plan.cH A D02-Dec-20215.7 KiB205115

modify_plan.hH A D02-Dec-2021475 156

option.cH A D02-Dec-20217.2 KiB270156

option.hH A D02-Dec-2021587 167

relinfo.cH A D02-Dec-202116.6 KiB516322

relinfo.hH A D02-Dec-20214 KiB14168

scan_exec.cH A D02-Dec-202111.9 KiB448279

scan_exec.hH A D02-Dec-20212.2 KiB6138

scan_plan.cH A D02-Dec-202129.1 KiB973544

scan_plan.hH A D02-Dec-20211.9 KiB5741

shippable.cH A D02-Dec-20216.7 KiB21482

shippable.hH A D02-Dec-2021497 177

README.md

1# Query planning and execution for distributed hypertables
2
3The code in this directory deals with the planning and execution of
4queries and inserts on distributed hypertables. The code is based on
5PostgreSQL's `postgres_fdw`-- the foreign data wrapper implementation
6for querying tables on remote PostgreSQL servers. While we rely on the
7same basic foreign data wrapper (FDW) API for interfacing with the
8main PostgreSQL planner and executor, we don't consider us strictly
9bound to this interface. Therefore, the `timescaledb_fdw`
10implementation is not to be considered a regular stand-alone foreign
11data wrapper in that you can't manually create foreign tables of that
12type. Instead, the use of the FDW interface is out of necessity and is
13a transparent part of distributed hypertables.
14
15The code is roughly split along planning and execution lines, and
16various utilities:
17
18* `fdw.c`: Implements the foreign data wrapper interface (FDW). This
19  is just a thin layer that calls into other code.
20* `modify_(plan|exec).c`: Planning and execution of inserts, updates,
21  deletes. Note, however, that inserts are mainly handled by
22  `data_node_dispatch.c`, which optimizes for batched inserts on
23  distributed hypertables.
24* `scan_(plan|exec).c`: General planning and execution of remote
25  relation scans.
26* `relinfo.c`: Information about a remote relation, which is used for
27  planning distributed queries/inserts. This can be considered an
28  extension of a standard `RelOptInfo` object.
29* `estimate.c`: Code for estimating the cost of scanning distributed
30  hypertables and chunks.
31* `option.c`: Parsing and validation of options on servers, tables,
32  extension levels that are related to distributed queries and
33  inserts.
34* `deparse.c`: Code to generate remote SQL queries from query
35  plans. The generated SQL statements are sent to remote data node
36  servers.
37* `shippable.c`: Determines whether expressions in queries are
38  shippable to the remote end. Certain functions are not safe to
39  execute on a remote data node or might not exist there.
40* `data_node_scan_(plan|exec).c`: Code to turn per-chunk plans into
41  per-server plans for more efficient execution.
42* `data_node_chunk_assignment.c`: Methods to assign/schedule chunks on
43  data node servers.
44