1 /*------------------------------------------------------------------------- 2 * 3 * pglogical_output_plugin.h 4 * pglogical output plugin 5 * 6 * Copyright (c) 2015, PostgreSQL Global Development Group 7 * 8 * IDENTIFICATION 9 * pglogical_output_plugin.h 10 * 11 *------------------------------------------------------------------------- 12 */ 13 #ifndef PG_LOGICAL_OUTPUT_PLUGIN_H 14 #define PG_LOGICAL_OUTPUT_PLUGIN_H 15 16 #include "nodes/pg_list.h" 17 #include "nodes/primnodes.h" 18 19 /* summon cross-PG-version compatibility voodoo */ 20 #include "pglogical_compat.h" 21 22 /* typedef appears in pglogical_output_plugin.h */ 23 typedef struct PGLogicalOutputData 24 { 25 MemoryContext context; 26 27 struct PGLogicalProtoAPI *api; 28 29 /* Cached node id */ 30 Oid local_node_id; 31 32 /* protocol */ 33 bool allow_internal_basetypes; 34 bool allow_binary_basetypes; 35 bool forward_changeset_origins; 36 int field_datum_encoding; 37 38 /* 39 * client info 40 * 41 * Lots of this should move to a separate shorter-lived struct used only 42 * during parameter reading, since it contains what the client asked for. 43 * Once we've processed this during startup we don't refer to it again. 44 */ 45 uint32 client_pg_version; 46 uint32 client_max_proto_version; 47 uint32 client_min_proto_version; 48 const char *client_expected_encoding; 49 const char *client_protocol_format; 50 uint32 client_binary_basetypes_major_version; 51 bool client_want_internal_basetypes_set; 52 bool client_want_internal_basetypes; 53 bool client_want_binary_basetypes_set; 54 bool client_want_binary_basetypes; 55 bool client_binary_bigendian_set; 56 bool client_binary_bigendian; 57 uint32 client_binary_sizeofdatum; 58 uint32 client_binary_sizeofint; 59 uint32 client_binary_sizeoflong; 60 bool client_binary_float4byval_set; 61 bool client_binary_float4byval; 62 bool client_binary_float8byval_set; 63 bool client_binary_float8byval; 64 bool client_binary_intdatetimes_set; 65 bool client_binary_intdatetimes; 66 bool client_no_txinfo; 67 68 /* List of origin names */ 69 List *forward_origins; 70 /* List of PGLogicalRepSet */ 71 List *replication_sets; 72 RangeVar *replicate_only_table; 73 } PGLogicalOutputData; 74 75 #endif /* PG_LOGICAL_OUTPUT_PLUGIN_H */ 76