1 /*------------------------------------------------------------------------- 2 * 3 * pg_dist_object.h 4 * definition of the system distributed objects relation (pg_dist_object). 5 * 6 * This table keeps metadata on all postgres objects that are distributed 7 * to all the nodes in the network. Objects in this table should all be 8 * present on all workers and kept in sync throughout their existance. 9 * This also means that all nodes joining the network are assumed to 10 * recreate all these objects. 11 * 12 * Copyright (c) Citus Data, Inc. 13 * 14 *------------------------------------------------------------------------- 15 */ 16 17 #ifndef PG_DIST_OBJECT_H 18 #define PG_DIST_OBJECT_H 19 20 21 /* ---------------- 22 * pg_dist_object definition. 23 * ---------------- 24 */ 25 typedef struct FormData_pg_dist_object 26 { 27 Oid classid; /* class of the distributed object */ 28 Oid objid; /* object id of the distributed object */ 29 int32 objsubid; /* object sub id of the distributed object, eg. attnum */ 30 31 #ifdef CATALOG_VARLEN /* variable-length fields start here */ 32 text type; 33 text[] object_names; 34 text[] object_arguments; 35 36 uint32 distribution_argument_index; /* only valid for distributed functions/procedures */ 37 uint32 colocationid; /* only valid for distributed functions/procedures */ 38 #endif 39 } FormData_pg_dist_object; 40 41 /* ---------------- 42 * Form_pg_dist_partitions corresponds to a pointer to a tuple with 43 * the format of pg_dist_partitions relation. 44 * ---------------- 45 */ 46 typedef FormData_pg_dist_object *Form_pg_dist_object; 47 48 /* ---------------- 49 * compiler constants for pg_dist_object 50 * ---------------- 51 */ 52 #define Natts_pg_dist_object 8 53 #define Anum_pg_dist_object_classid 1 54 #define Anum_pg_dist_object_objid 2 55 #define Anum_pg_dist_object_objsubid 3 56 #define Anum_pg_dist_object_type 4 57 #define Anum_pg_dist_object_object_names 5 58 #define Anum_pg_dist_object_object_args 6 59 #define Anum_pg_dist_object_distribution_argument_index 7 60 #define Anum_pg_dist_object_colocationid 8 61 62 #endif /* PG_DIST_OBJECT_H */ 63