postgresai 0.19.0-dev.1 → 0.19.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/postgres-ai.js +192 -4
- package/package.json +1 -1
- package/schemas/D004.schema.json +315 -2
package/dist/bin/postgres-ai.js
CHANGED
|
@@ -13538,7 +13538,7 @@ var {
|
|
|
13538
13538
|
// package.json
|
|
13539
13539
|
var package_default = {
|
|
13540
13540
|
name: "postgresai",
|
|
13541
|
-
version: "0.19.0-
|
|
13541
|
+
version: "0.19.0-rc.2",
|
|
13542
13542
|
description: "postgres_ai CLI",
|
|
13543
13543
|
license: "Apache-2.0",
|
|
13544
13544
|
private: false,
|
|
@@ -16898,7 +16898,7 @@ var Result = import_lib.default.Result;
|
|
|
16898
16898
|
var TypeOverrides = import_lib.default.TypeOverrides;
|
|
16899
16899
|
var defaults = import_lib.default.defaults;
|
|
16900
16900
|
// package.json
|
|
16901
|
-
var version = "0.19.0-
|
|
16901
|
+
var version = "0.19.0-rc.2";
|
|
16902
16902
|
var package_default2 = {
|
|
16903
16903
|
name: "postgresai",
|
|
16904
16904
|
version,
|
|
@@ -44701,10 +44701,198 @@ async function generateD004(client, nodeName) {
|
|
|
44701
44701
|
...kcacheError && { error: kcacheError }
|
|
44702
44702
|
}
|
|
44703
44703
|
},
|
|
44704
|
+
observability: await d004CatalogFacts(client),
|
|
44704
44705
|
postgres_version: postgresVersion
|
|
44705
44706
|
};
|
|
44706
44707
|
return report;
|
|
44707
44708
|
}
|
|
44709
|
+
var D004_EXTENSIONS = ["pg_stat_statements", "pg_stat_kcache", "pg_wait_sampling", "pg_stat_monitor", "pg_qualstats", "pg_store_plans"];
|
|
44710
|
+
var D004_SETTING_PATTERN = "^(pg_stat_statements|pg_stat_kcache|pg_wait_sampling|pg_stat_monitor|pg_qualstats|pg_store_plans)\\..*$" + "|^(shared_preload_libraries|session_preload_libraries)$";
|
|
44711
|
+
var D004_OVERRIDE_PATTERN = /^(pg_stat_statements|pg_stat_kcache|pg_wait_sampling|pg_stat_monitor|pg_qualstats|pg_store_plans)\..*$/;
|
|
44712
|
+
var D004_AVAILABLE_SQL = `
|
|
44713
|
+
select name, default_version, installed_version
|
|
44714
|
+
from pg_available_extensions
|
|
44715
|
+
where name = any($1)
|
|
44716
|
+
order by name`;
|
|
44717
|
+
var D004_INSTALLED_SQL = `
|
|
44718
|
+
select e.extname as name, e.extversion as version, n.nspname as schema
|
|
44719
|
+
from pg_extension as e join pg_namespace as n on n.oid = e.extnamespace
|
|
44720
|
+
where e.extname = any($1)
|
|
44721
|
+
order by e.extname`;
|
|
44722
|
+
function d004EntriesSql(pgss) {
|
|
44723
|
+
return `
|
|
44724
|
+
select d.datname as database, count(*)::bigint as entries, coalesce(sum(p.calls), 0)::bigint as calls,
|
|
44725
|
+
(count(*) filter (where p.calls = 1))::bigint as called_once,
|
|
44726
|
+
(count(*) filter (where p.query ~* '\\m(pg_temp(_[0-9]+)?|temp|temporary)\\M'))::bigint as temp_table_text,
|
|
44727
|
+
bool_and(p.query <> '<insufficient privilege>') as texts_visible
|
|
44728
|
+
from ${pgss} as p left join pg_database as d on d.oid = p.dbid
|
|
44729
|
+
group by d.datname
|
|
44730
|
+
order by count(*) desc`;
|
|
44731
|
+
}
|
|
44732
|
+
function d004PerRound(entries) {
|
|
44733
|
+
return Math.min(entries, Math.max(10, Math.floor(entries * 5 / 100)));
|
|
44734
|
+
}
|
|
44735
|
+
async function d004Installed(client) {
|
|
44736
|
+
const out = {};
|
|
44737
|
+
for (const row of (await client.query(D004_INSTALLED_SQL, [D004_EXTENSIONS])).rows) {
|
|
44738
|
+
out[row.name] = { version: String(row.version), schema: String(row.schema) };
|
|
44739
|
+
}
|
|
44740
|
+
return out;
|
|
44741
|
+
}
|
|
44742
|
+
var D004_DATABASES_SQL = `
|
|
44743
|
+
select d.datname, d.datname = current_database() as is_current,
|
|
44744
|
+
has_database_privilege(d.oid, 'CONNECT') as can_connect
|
|
44745
|
+
from pg_database as d
|
|
44746
|
+
where d.datallowconn and not d.datistemplate
|
|
44747
|
+
order by d.datname`;
|
|
44748
|
+
async function d004Statements(client, schema, max) {
|
|
44749
|
+
const quoted = `"${schema.replace(/"/g, '""')}"`;
|
|
44750
|
+
const rows = (await client.query(d004EntriesSql(`${quoted}.pg_stat_statements`))).rows;
|
|
44751
|
+
const visible = rows.every((row) => row.texts_visible !== false);
|
|
44752
|
+
const out = {
|
|
44753
|
+
schema,
|
|
44754
|
+
entries: rows.reduce((sum, row) => sum + (parseInt(row.entries, 10) || 0), 0),
|
|
44755
|
+
by_database: rows.map((row) => ({
|
|
44756
|
+
database: row.database ?? null,
|
|
44757
|
+
entries: parseInt(row.entries, 10) || 0,
|
|
44758
|
+
calls: parseInt(row.calls, 10) || 0,
|
|
44759
|
+
called_once: parseInt(row.called_once, 10) || 0,
|
|
44760
|
+
...visible ? { temp_table_text: parseInt(row.temp_table_text, 10) || 0 } : {}
|
|
44761
|
+
}))
|
|
44762
|
+
};
|
|
44763
|
+
if (!visible)
|
|
44764
|
+
out.temp_table_text_error = "the reading role has no pg_read_all_stats: statement texts are hidden";
|
|
44765
|
+
try {
|
|
44766
|
+
const info = (await client.query(`select dealloc, stats_reset, now() as read_at from ${quoted}.pg_stat_statements_info`)).rows[0];
|
|
44767
|
+
if (info) {
|
|
44768
|
+
out.dealloc = parseInt(info.dealloc, 10) || 0;
|
|
44769
|
+
out.stats_reset = d001Iso(info.stats_reset);
|
|
44770
|
+
out.read_at = d001Iso(info.read_at);
|
|
44771
|
+
const reset = info.stats_reset instanceof Date ? info.stats_reset.getTime() : NaN;
|
|
44772
|
+
const read = info.read_at instanceof Date ? info.read_at.getTime() : NaN;
|
|
44773
|
+
if (Number.isFinite(reset) && Number.isFinite(read))
|
|
44774
|
+
out.days_since_reset = Math.round((read - reset) / 864000) / 100;
|
|
44775
|
+
if (out.dealloc && max)
|
|
44776
|
+
out.per_round_at_max = d004PerRound(max);
|
|
44777
|
+
}
|
|
44778
|
+
} catch (err) {
|
|
44779
|
+
out.dealloc_error = a005Error(err);
|
|
44780
|
+
}
|
|
44781
|
+
return out;
|
|
44782
|
+
}
|
|
44783
|
+
async function d004CatalogFacts(client) {
|
|
44784
|
+
const out = {};
|
|
44785
|
+
const fact = async (key, read) => {
|
|
44786
|
+
try {
|
|
44787
|
+
const value = await read();
|
|
44788
|
+
out[key] = value;
|
|
44789
|
+
return value;
|
|
44790
|
+
} catch (err) {
|
|
44791
|
+
out[`${key}_error`] = a005Error(err);
|
|
44792
|
+
return;
|
|
44793
|
+
}
|
|
44794
|
+
};
|
|
44795
|
+
await fact("read_as", async () => (await client.query("select current_user as role, current_database() as database")).rows[0]);
|
|
44796
|
+
const settingsRead = await fact("settings", async () => {
|
|
44797
|
+
const settings = {};
|
|
44798
|
+
for (const row of (await client.query(D001_SETTINGS_SQL, [D004_SETTING_PATTERN])).rows) {
|
|
44799
|
+
const setting = row.setting === null ? "" : String(row.setting);
|
|
44800
|
+
settings[row.name] = {
|
|
44801
|
+
setting,
|
|
44802
|
+
unit: row.unit || "",
|
|
44803
|
+
category: row.category || "",
|
|
44804
|
+
context: row.context || "",
|
|
44805
|
+
vartype: row.vartype || "",
|
|
44806
|
+
source: row.source || "",
|
|
44807
|
+
is_default: setting === row.boot_val,
|
|
44808
|
+
pending_restart: Boolean(row.pending_restart)
|
|
44809
|
+
};
|
|
44810
|
+
}
|
|
44811
|
+
return settings;
|
|
44812
|
+
});
|
|
44813
|
+
await fact("available", async () => {
|
|
44814
|
+
const available = {};
|
|
44815
|
+
for (const row of (await client.query(D004_AVAILABLE_SQL, [D004_EXTENSIONS])).rows) {
|
|
44816
|
+
available[row.name] = { default_version: row.default_version ?? null };
|
|
44817
|
+
}
|
|
44818
|
+
return available;
|
|
44819
|
+
});
|
|
44820
|
+
await fact("overrides", async () => {
|
|
44821
|
+
const rows = (await client.query(D001_OVERRIDES_SQL)).rows;
|
|
44822
|
+
const values = [];
|
|
44823
|
+
for (const row of rows) {
|
|
44824
|
+
for (const [name, value] of Object.entries(d001Config(row.config, D004_OVERRIDE_PATTERN))) {
|
|
44825
|
+
const scope = row.role && row.database ? "role in database" : row.role ? "role" : row.database ? "database" : "all";
|
|
44826
|
+
values.push({ scope, role: row.role ?? null, database: row.database ?? null, setting: name, value });
|
|
44827
|
+
}
|
|
44828
|
+
}
|
|
44829
|
+
return { rows_read: rows.length, values };
|
|
44830
|
+
});
|
|
44831
|
+
const databases = {};
|
|
44832
|
+
let pgssDb = null;
|
|
44833
|
+
let pgssSchema = null;
|
|
44834
|
+
let pgssOther = null;
|
|
44835
|
+
let listed = null;
|
|
44836
|
+
try {
|
|
44837
|
+
listed = (await client.query(D004_DATABASES_SQL)).rows;
|
|
44838
|
+
} catch (err) {
|
|
44839
|
+
out.databases_error = a005Error(err);
|
|
44840
|
+
}
|
|
44841
|
+
const started = Date.now();
|
|
44842
|
+
let opened = 0;
|
|
44843
|
+
try {
|
|
44844
|
+
for (const row of listed || []) {
|
|
44845
|
+
const entry = {};
|
|
44846
|
+
databases[row.datname] = entry;
|
|
44847
|
+
let other = null;
|
|
44848
|
+
try {
|
|
44849
|
+
if (toBool(row.is_current)) {
|
|
44850
|
+
entry.installed = await d004Installed(client);
|
|
44851
|
+
} else {
|
|
44852
|
+
if (!toBool(row.can_connect))
|
|
44853
|
+
throw new Error("the checkup role has no CONNECT privilege on this database");
|
|
44854
|
+
if (opened >= A005_MAX_DATABASES)
|
|
44855
|
+
throw new Error(`not read: more than ${A005_MAX_DATABASES} databases`);
|
|
44856
|
+
if (Date.now() - started > A005_TIME_BUDGET_MS)
|
|
44857
|
+
throw new Error("not read: the time budget ran out");
|
|
44858
|
+
opened += 1;
|
|
44859
|
+
other = await a005OpenDatabase(client, row.datname);
|
|
44860
|
+
entry.installed = await d004Installed(other);
|
|
44861
|
+
}
|
|
44862
|
+
} catch (err) {
|
|
44863
|
+
entry.error = a005Error(err);
|
|
44864
|
+
}
|
|
44865
|
+
const found = entry.installed?.pg_stat_statements;
|
|
44866
|
+
if (found && (pgssDb === null || toBool(row.is_current))) {
|
|
44867
|
+
if (pgssOther)
|
|
44868
|
+
await pgssOther.end().catch(() => {});
|
|
44869
|
+
pgssDb = row.datname;
|
|
44870
|
+
pgssSchema = found.schema;
|
|
44871
|
+
pgssOther = toBool(row.is_current) ? null : other;
|
|
44872
|
+
other = null;
|
|
44873
|
+
}
|
|
44874
|
+
if (other)
|
|
44875
|
+
await other.end().catch(() => {});
|
|
44876
|
+
}
|
|
44877
|
+
if (listed)
|
|
44878
|
+
out.databases = databases;
|
|
44879
|
+
if (listed && (pgssDb === null || pgssSchema === null)) {
|
|
44880
|
+
out.statements_error = "pg_stat_statements is not created in any database read";
|
|
44881
|
+
} else if (listed) {
|
|
44882
|
+
const cap = parseInt(String(settingsRead?.["pg_stat_statements.max"]?.setting ?? ""), 10);
|
|
44883
|
+
const statements = await fact("statements", () => d004Statements(pgssOther ?? client, pgssSchema, Number.isFinite(cap) ? cap : null));
|
|
44884
|
+
if (statements)
|
|
44885
|
+
statements.database = pgssDb;
|
|
44886
|
+
}
|
|
44887
|
+
} catch (err) {
|
|
44888
|
+
out.databases_error = a005Error(err);
|
|
44889
|
+
} finally {
|
|
44890
|
+
if (pgssOther)
|
|
44891
|
+
await pgssOther.end().catch(() => {});
|
|
44892
|
+
}
|
|
44893
|
+
out.monitored_calls_window_error = "the express checkup has no monitoring: one reading, no window";
|
|
44894
|
+
return out;
|
|
44895
|
+
}
|
|
44708
44896
|
var D001_SETTING_PATTERN = "^(log_.*|logging_collector|auto_explain\\..*|shared_preload_libraries|session_preload_libraries|deadlock_timeout)$";
|
|
44709
44897
|
var D001_OVERRIDE_PATTERN = /^(log_.*|auto_explain\..*|session_preload_libraries|statement_timeout)$/;
|
|
44710
44898
|
var D001_BASE_THRESHOLDS_MS = [1000, 1e4];
|
|
@@ -44806,13 +44994,13 @@ function d001Thresholds(settings, overrides) {
|
|
|
44806
44994
|
out.add(value);
|
|
44807
44995
|
return [...out].sort((a, b) => a - b);
|
|
44808
44996
|
}
|
|
44809
|
-
function d001Config(config) {
|
|
44997
|
+
function d001Config(config, pattern = D001_OVERRIDE_PATTERN) {
|
|
44810
44998
|
const out = {};
|
|
44811
44999
|
for (const item of Array.isArray(config) ? config : []) {
|
|
44812
45000
|
const text = String(item);
|
|
44813
45001
|
const at = text.indexOf("=");
|
|
44814
45002
|
const name = at < 0 ? text : text.slice(0, at);
|
|
44815
|
-
if (
|
|
45003
|
+
if (pattern.test(name))
|
|
44816
45004
|
out[name] = at < 0 ? "" : text.slice(at + 1);
|
|
44817
45005
|
}
|
|
44818
45006
|
return out;
|
package/package.json
CHANGED
package/schemas/D004.schema.json
CHANGED
|
@@ -121,16 +121,329 @@
|
|
|
121
121
|
"pg_stat_kcache_status": { "$ref": "#/$defs/kcacheStatus" }
|
|
122
122
|
}
|
|
123
123
|
},
|
|
124
|
+
"catalogSetting": {
|
|
125
|
+
"type": "object",
|
|
126
|
+
"additionalProperties": false,
|
|
127
|
+
"required": [
|
|
128
|
+
"setting",
|
|
129
|
+
"unit",
|
|
130
|
+
"category",
|
|
131
|
+
"context",
|
|
132
|
+
"vartype",
|
|
133
|
+
"source",
|
|
134
|
+
"is_default",
|
|
135
|
+
"pending_restart"
|
|
136
|
+
],
|
|
137
|
+
"properties": {
|
|
138
|
+
"setting": {
|
|
139
|
+
"type": "string"
|
|
140
|
+
},
|
|
141
|
+
"unit": {
|
|
142
|
+
"type": "string"
|
|
143
|
+
},
|
|
144
|
+
"category": {
|
|
145
|
+
"type": "string"
|
|
146
|
+
},
|
|
147
|
+
"context": {
|
|
148
|
+
"type": "string"
|
|
149
|
+
},
|
|
150
|
+
"vartype": {
|
|
151
|
+
"type": "string"
|
|
152
|
+
},
|
|
153
|
+
"source": {
|
|
154
|
+
"type": "string"
|
|
155
|
+
},
|
|
156
|
+
"is_default": {
|
|
157
|
+
"type": "boolean"
|
|
158
|
+
},
|
|
159
|
+
"pending_restart": {
|
|
160
|
+
"type": "boolean"
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"installed": {
|
|
165
|
+
"type": "object",
|
|
166
|
+
"additionalProperties": {
|
|
167
|
+
"type": "object",
|
|
168
|
+
"additionalProperties": false,
|
|
169
|
+
"required": [
|
|
170
|
+
"version",
|
|
171
|
+
"schema"
|
|
172
|
+
],
|
|
173
|
+
"properties": {
|
|
174
|
+
"version": {
|
|
175
|
+
"type": "string"
|
|
176
|
+
},
|
|
177
|
+
"schema": {
|
|
178
|
+
"type": "string"
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"observability": {
|
|
184
|
+
"type": "object",
|
|
185
|
+
"additionalProperties": false,
|
|
186
|
+
"properties": {
|
|
187
|
+
"node_error": {
|
|
188
|
+
"type": "string"
|
|
189
|
+
},
|
|
190
|
+
"read_as": {
|
|
191
|
+
"type": "object",
|
|
192
|
+
"additionalProperties": false,
|
|
193
|
+
"required": [
|
|
194
|
+
"role",
|
|
195
|
+
"database"
|
|
196
|
+
],
|
|
197
|
+
"properties": {
|
|
198
|
+
"role": {
|
|
199
|
+
"type": "string"
|
|
200
|
+
},
|
|
201
|
+
"database": {
|
|
202
|
+
"type": "string"
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"read_as_error": {
|
|
207
|
+
"type": "string"
|
|
208
|
+
},
|
|
209
|
+
"settings": {
|
|
210
|
+
"type": "object",
|
|
211
|
+
"additionalProperties": {
|
|
212
|
+
"$ref": "#/$defs/catalogSetting"
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"settings_error": {
|
|
216
|
+
"type": "string"
|
|
217
|
+
},
|
|
218
|
+
"available": {
|
|
219
|
+
"type": "object",
|
|
220
|
+
"additionalProperties": {
|
|
221
|
+
"type": "object",
|
|
222
|
+
"additionalProperties": false,
|
|
223
|
+
"required": [
|
|
224
|
+
"default_version"
|
|
225
|
+
],
|
|
226
|
+
"properties": {
|
|
227
|
+
"default_version": {
|
|
228
|
+
"type": [
|
|
229
|
+
"string",
|
|
230
|
+
"null"
|
|
231
|
+
]
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"available_error": {
|
|
237
|
+
"type": "string"
|
|
238
|
+
},
|
|
239
|
+
"overrides": {
|
|
240
|
+
"type": "object",
|
|
241
|
+
"additionalProperties": false,
|
|
242
|
+
"required": [
|
|
243
|
+
"rows_read",
|
|
244
|
+
"values"
|
|
245
|
+
],
|
|
246
|
+
"properties": {
|
|
247
|
+
"rows_read": {
|
|
248
|
+
"type": "integer"
|
|
249
|
+
},
|
|
250
|
+
"values": {
|
|
251
|
+
"type": "array",
|
|
252
|
+
"items": {
|
|
253
|
+
"type": "object",
|
|
254
|
+
"additionalProperties": false,
|
|
255
|
+
"required": [
|
|
256
|
+
"scope",
|
|
257
|
+
"role",
|
|
258
|
+
"database",
|
|
259
|
+
"setting",
|
|
260
|
+
"value"
|
|
261
|
+
],
|
|
262
|
+
"properties": {
|
|
263
|
+
"scope": {
|
|
264
|
+
"enum": [
|
|
265
|
+
"all",
|
|
266
|
+
"role",
|
|
267
|
+
"database",
|
|
268
|
+
"role in database"
|
|
269
|
+
]
|
|
270
|
+
},
|
|
271
|
+
"role": {
|
|
272
|
+
"type": [
|
|
273
|
+
"string",
|
|
274
|
+
"null"
|
|
275
|
+
]
|
|
276
|
+
},
|
|
277
|
+
"database": {
|
|
278
|
+
"type": [
|
|
279
|
+
"string",
|
|
280
|
+
"null"
|
|
281
|
+
]
|
|
282
|
+
},
|
|
283
|
+
"setting": {
|
|
284
|
+
"type": "string"
|
|
285
|
+
},
|
|
286
|
+
"value": {
|
|
287
|
+
"type": "string"
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
"overrides_error": {
|
|
295
|
+
"type": "string"
|
|
296
|
+
},
|
|
297
|
+
"databases": {
|
|
298
|
+
"type": "object",
|
|
299
|
+
"additionalProperties": {
|
|
300
|
+
"type": "object",
|
|
301
|
+
"additionalProperties": false,
|
|
302
|
+
"properties": {
|
|
303
|
+
"installed": {
|
|
304
|
+
"$ref": "#/$defs/installed"
|
|
305
|
+
},
|
|
306
|
+
"error": {
|
|
307
|
+
"type": "string"
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
"statements": {
|
|
313
|
+
"type": "object",
|
|
314
|
+
"additionalProperties": false,
|
|
315
|
+
"required": [
|
|
316
|
+
"schema",
|
|
317
|
+
"entries",
|
|
318
|
+
"by_database"
|
|
319
|
+
],
|
|
320
|
+
"properties": {
|
|
321
|
+
"schema": {
|
|
322
|
+
"type": "string"
|
|
323
|
+
},
|
|
324
|
+
"database": {
|
|
325
|
+
"type": "string"
|
|
326
|
+
},
|
|
327
|
+
"entries": {
|
|
328
|
+
"type": "integer"
|
|
329
|
+
},
|
|
330
|
+
"by_database": {
|
|
331
|
+
"type": "array",
|
|
332
|
+
"items": {
|
|
333
|
+
"type": "object",
|
|
334
|
+
"additionalProperties": false,
|
|
335
|
+
"required": [
|
|
336
|
+
"database",
|
|
337
|
+
"entries",
|
|
338
|
+
"calls",
|
|
339
|
+
"called_once"
|
|
340
|
+
],
|
|
341
|
+
"properties": {
|
|
342
|
+
"database": {
|
|
343
|
+
"type": [
|
|
344
|
+
"string",
|
|
345
|
+
"null"
|
|
346
|
+
]
|
|
347
|
+
},
|
|
348
|
+
"entries": {
|
|
349
|
+
"type": "integer"
|
|
350
|
+
},
|
|
351
|
+
"calls": {
|
|
352
|
+
"type": "integer"
|
|
353
|
+
},
|
|
354
|
+
"called_once": {
|
|
355
|
+
"type": "integer"
|
|
356
|
+
},
|
|
357
|
+
"temp_table_text": {
|
|
358
|
+
"type": "integer"
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
"temp_table_text_error": {
|
|
364
|
+
"type": "string"
|
|
365
|
+
},
|
|
366
|
+
"dealloc": {
|
|
367
|
+
"type": "integer"
|
|
368
|
+
},
|
|
369
|
+
"stats_reset": {
|
|
370
|
+
"type": [
|
|
371
|
+
"string",
|
|
372
|
+
"null"
|
|
373
|
+
]
|
|
374
|
+
},
|
|
375
|
+
"read_at": {
|
|
376
|
+
"type": [
|
|
377
|
+
"string",
|
|
378
|
+
"null"
|
|
379
|
+
]
|
|
380
|
+
},
|
|
381
|
+
"dealloc_error": {
|
|
382
|
+
"type": "string"
|
|
383
|
+
},
|
|
384
|
+
"per_round_at_max": {
|
|
385
|
+
"type": "integer"
|
|
386
|
+
},
|
|
387
|
+
"days_since_reset": {
|
|
388
|
+
"type": "number"
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
"statements_error": {
|
|
393
|
+
"type": "string"
|
|
394
|
+
},
|
|
395
|
+
"databases_error": {
|
|
396
|
+
"type": "string"
|
|
397
|
+
},
|
|
398
|
+
"monitored_calls_window": {
|
|
399
|
+
"type": "array",
|
|
400
|
+
"items": {
|
|
401
|
+
"type": "object",
|
|
402
|
+
"additionalProperties": false,
|
|
403
|
+
"required": [
|
|
404
|
+
"start",
|
|
405
|
+
"end",
|
|
406
|
+
"days",
|
|
407
|
+
"total",
|
|
408
|
+
"database",
|
|
409
|
+
"statements"
|
|
410
|
+
],
|
|
411
|
+
"properties": {
|
|
412
|
+
"start": {
|
|
413
|
+
"type": "string"
|
|
414
|
+
},
|
|
415
|
+
"end": {
|
|
416
|
+
"type": "string"
|
|
417
|
+
},
|
|
418
|
+
"days": {
|
|
419
|
+
"type": "number"
|
|
420
|
+
},
|
|
421
|
+
"total": {
|
|
422
|
+
"type": "integer"
|
|
423
|
+
},
|
|
424
|
+
"database": {
|
|
425
|
+
"type": "string"
|
|
426
|
+
},
|
|
427
|
+
"statements": {
|
|
428
|
+
"type": "integer"
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
"monitored_calls_window_error": {
|
|
434
|
+
"type": "string"
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
},
|
|
124
438
|
"nodeResult": {
|
|
125
439
|
"type": "object",
|
|
126
440
|
"additionalProperties": false,
|
|
127
441
|
"required": ["data"],
|
|
128
442
|
"properties": {
|
|
129
443
|
"data": { "$ref": "#/$defs/data" },
|
|
444
|
+
"observability": { "$ref": "#/$defs/observability" },
|
|
130
445
|
"postgres_version": { "$ref": "#/$defs/postgresVersion" }
|
|
131
446
|
}
|
|
132
447
|
}
|
|
133
448
|
}
|
|
134
449
|
}
|
|
135
|
-
|
|
136
|
-
|