Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e5344a7

Browse files
committed
use same_naming_style in all SQL types
1 parent bae4679 commit e5344a7

File tree

1 file changed

+60
-5
lines changed

1 file changed

+60
-5
lines changed

multimaster--1.0.sql

Lines changed: 60 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,71 @@ CREATE FUNCTION mtm.get_last_csn() RETURNS bigint
5353
AS 'MODULE_PATHNAME','mtm_get_last_csn'
5454
LANGUAGE C;
5555

56-
CREATE TYPE mtm.node_state AS ("id" integer, "enabled" bool, "connected" bool, "slot_active" bool, "stopped" bool, "catchUp" bool, "slotLag" bigint, "avgTransDelay" bigint, "lastStatusChange" timestamp, "oldestSnapshot" bigint, "SenderPid" integer, "SenderStartTime" timestamp, "ReceiverPid" integer, "ReceiverStartTime" timestamp, "connStr" text, "connectivityMask" bigint, "nHeartbeats" bigint);
56+
CREATE TYPE mtm.node_state AS (
57+
"id" integer,
58+
"enabled" bool,
59+
"connected" bool,
60+
"slot_active" bool,
61+
"stopped" bool,
62+
"catch_up" bool,
63+
"slot_lag" bigint,
64+
"avg_trans_delay" bigint,
65+
"last_status_change" timestamp,
66+
"oldest_snapshot" bigint,
67+
"sender_pid" integer,
68+
"sender_start_time" timestamp,
69+
"receiver_pid" integer,
70+
"receiver_start_time" timestamp,
71+
"conn_str" text,
72+
"connectivity_mask" bigint,
73+
"n_heartbeats" bigint
74+
);
5775

5876
CREATE FUNCTION mtm.get_nodes_state() RETURNS SETOF mtm.node_state
5977
AS 'MODULE_PATHNAME','mtm_get_nodes_state'
6078
LANGUAGE C;
6179

62-
CREATE TYPE mtm.cluster_state AS ("id" integer, "status" text, "disabledNodeMask" bigint, "disconnectedNodeMask" bigint, "catchUpNodeMask" bigint, "liveNodes" integer, "allNodes" integer, "nActiveQueries" integer, "nPendingQueries" integer, "queueSize" bigint, "transCount" bigint, "timeShift" bigint, "recoverySlot" integer,
63-
"xidHashSize" bigint, "gidHashSize" bigint, "oldestXid" bigint, "configChanges" integer, "stalledNodeMask" bigint, "stoppedNodeMask" bigint, "deadNodeMask" bigint, "lastStatusChange" timestamp);
64-
65-
CREATE TYPE mtm.trans_state AS ("status" text, "gid" text, "xid" bigint, "coordinator" integer, "gxid" bigint, "csn" timestamp, "snapshot" timestamp, "local" boolean, "prepared" boolean, "active" boolean, "twophase" boolean, "votingCompleted" boolean, "participants" bigint, "voted" bigint, "configChanges" integer);
80+
CREATE TYPE mtm.cluster_state AS (
81+
"id" integer,
82+
"status" text,
83+
"disabled_node_mask" bigint,
84+
"disconnected_node_mask" bigint,
85+
"catch_up_node_mask" bigint,
86+
"live_nodes" integer,
87+
"all_nodes" integer,
88+
"n_active_queries" integer,
89+
"n_pending_queries" integer,
90+
"queue_size" bigint,
91+
"trans_count" bigint,
92+
"time_shift" bigint,
93+
"recovery_slot" integer,
94+
"xid_hash_size" bigint,
95+
"gid_hash_size" bigint,
96+
"oldest_xid" bigint,
97+
"config_changes" integer,
98+
"stalled_node_mask" bigint,
99+
"stopped_node_mask" bigint,
100+
"dead_node_mask" bigint,
101+
"last_status_change" timestamp
102+
);
103+
104+
CREATE TYPE mtm.trans_state AS (
105+
"status" text,
106+
"gid" text,
107+
"xid" bigint,
108+
"coordinator" integer,
109+
"gxid" bigint,
110+
"csn" timestamp,
111+
"snapshot" timestamp,
112+
"local" boolean,
113+
"prepared" boolean,
114+
"active" boolean,
115+
"twophase" boolean,
116+
"voting_completed" boolean,
117+
"participants" bigint,
118+
"voted" bigint,
119+
"config_changes" integer
120+
);
66121

67122
CREATE FUNCTION mtm.get_trans_by_gid(git text) RETURNS mtm.trans_state
68123
AS 'MODULE_PATHNAME','mtm_get_trans_by_gid'

0 commit comments

Comments
 (0)