postgresai 0.18.0-rc.5 → 0.18.1-rc.1
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 +10 -6
- package/package.json +1 -1
- package/schemas/A005.schema.json +5 -0
- package/schemas/H002.schema.json +38 -6
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.18.
|
|
13541
|
+
version: "0.18.1-rc.1",
|
|
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.18.
|
|
16901
|
+
var version = "0.18.1-rc.1";
|
|
16902
16902
|
var package_default2 = {
|
|
16903
16903
|
name: "postgresai",
|
|
16904
16904
|
version,
|
|
@@ -44410,7 +44410,9 @@ select
|
|
|
44410
44410
|
group by am.amname, x.extname
|
|
44411
44411
|
) as t), '[]'::json) as index_access_methods,
|
|
44412
44412
|
(select count(*) from pg_policy)::int as row_security_policies,
|
|
44413
|
-
(select count(*) from pg_statistic_ext)::int as extended_statistics
|
|
44413
|
+
(select count(*) from pg_statistic_ext)::int as extended_statistics,
|
|
44414
|
+
(select count(*) from pg_constraint
|
|
44415
|
+
where contype in ('u', 'p') and condeferrable)::int as deferrable_uniques
|
|
44414
44416
|
`;
|
|
44415
44417
|
var A005_DATABASES_SQL = `
|
|
44416
44418
|
select d.datname, d.datname = current_database() as is_current,
|
|
@@ -44488,7 +44490,8 @@ async function a005ReadDatabase(client) {
|
|
|
44488
44490
|
extensions: row.extensions || {},
|
|
44489
44491
|
index_access_methods: row.index_access_methods || [],
|
|
44490
44492
|
row_security_policies: Number(row.row_security_policies ?? 0),
|
|
44491
|
-
extended_statistics: Number(row.extended_statistics ?? 0)
|
|
44493
|
+
extended_statistics: Number(row.extended_statistics ?? 0),
|
|
44494
|
+
deferrable_uniques: Number(row.deferrable_uniques ?? 0)
|
|
44492
44495
|
};
|
|
44493
44496
|
}
|
|
44494
44497
|
function a005Conclusions(data) {
|
|
@@ -49654,6 +49657,7 @@ async function runPrestart(projectDir, instancesPath, imageTag) {
|
|
|
49654
49657
|
console.log(`\u2713 Monitoring infrastructure started; finish with 'postgresai mon local-install --continue-prestarted --db-url <url> --api-key <key>'
|
|
49655
49658
|
`);
|
|
49656
49659
|
}
|
|
49660
|
+
var SINK_PROMETHEUS_RELOAD = ["exec", "-T", "sink-prometheus", "kill", "-HUP", "1"];
|
|
49657
49661
|
async function reloadHostMetricsFiles(projectDir) {
|
|
49658
49662
|
let files = [];
|
|
49659
49663
|
try {
|
|
@@ -49663,7 +49667,7 @@ async function reloadHostMetricsFiles(projectDir) {
|
|
|
49663
49667
|
}
|
|
49664
49668
|
if (files.length === 0)
|
|
49665
49669
|
return;
|
|
49666
|
-
if (await runCompose(
|
|
49670
|
+
if (await runCompose(SINK_PROMETHEUS_RELOAD) !== 0) {
|
|
49667
49671
|
console.error("\u26A0 Could not reload the metrics store; host metrics start after 'postgresai mon restart'");
|
|
49668
49672
|
}
|
|
49669
49673
|
}
|
|
@@ -51139,7 +51143,7 @@ async function reloadHostMetrics(projectDir, job, file) {
|
|
|
51139
51143
|
return true;
|
|
51140
51144
|
}
|
|
51141
51145
|
}
|
|
51142
|
-
if (await runCompose(
|
|
51146
|
+
if (await runCompose(SINK_PROMETHEUS_RELOAD) !== 0) {
|
|
51143
51147
|
console.error("Reloading sink-prometheus failed. Run 'postgresai mon restart' to load the host metrics change.");
|
|
51144
51148
|
return false;
|
|
51145
51149
|
}
|
package/package.json
CHANGED
package/schemas/A005.schema.json
CHANGED
|
@@ -177,6 +177,11 @@
|
|
|
177
177
|
"extended_statistics": {
|
|
178
178
|
"type": "integer",
|
|
179
179
|
"minimum": 0
|
|
180
|
+
},
|
|
181
|
+
"deferrable_uniques": {
|
|
182
|
+
"description": "Deferrable unique and primary-key constraints (pg_constraint.condeferrable); absent in files written before it existed.",
|
|
183
|
+
"type": "integer",
|
|
184
|
+
"minimum": 0
|
|
180
185
|
}
|
|
181
186
|
},
|
|
182
187
|
"if": {
|
package/schemas/H002.schema.json
CHANGED
|
@@ -64,9 +64,11 @@
|
|
|
64
64
|
"reason": { "type": "string" },
|
|
65
65
|
"idx_scan": { "type": "number" },
|
|
66
66
|
"index_size_bytes": { "type": "number" },
|
|
67
|
-
"idx_is_btree": { "type": "boolean" },
|
|
68
|
-
"supports_fk": { "type": "boolean" },
|
|
69
|
-
"index_size_pretty": { "type": "string" }
|
|
67
|
+
"idx_is_btree": { "type": ["boolean", "null"] },
|
|
68
|
+
"supports_fk": { "type": ["boolean", "null"] },
|
|
69
|
+
"index_size_pretty": { "type": "string" },
|
|
70
|
+
"zero_scans_since_epoch": { "type": "number" },
|
|
71
|
+
"zero_scans_since_time": { "type": "string" }
|
|
70
72
|
}
|
|
71
73
|
},
|
|
72
74
|
"statsReset": {
|
|
@@ -107,7 +109,39 @@
|
|
|
107
109
|
"total_size_pretty": { "type": "string" },
|
|
108
110
|
"database_size_bytes": { "type": "number" },
|
|
109
111
|
"database_size_pretty": { "type": "string" },
|
|
110
|
-
"stats_reset": { "$ref": "#/$defs/statsReset" }
|
|
112
|
+
"stats_reset": { "$ref": "#/$defs/statsReset" },
|
|
113
|
+
"scan_window": { "$ref": "#/$defs/scanWindow" },
|
|
114
|
+
"table_writes": { "type": "array", "items": { "$ref": "#/$defs/tableWrites" } }
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"scanWindow": {
|
|
118
|
+
"type": "object",
|
|
119
|
+
"additionalProperties": false,
|
|
120
|
+
"required": ["start_epoch", "start_time", "end_epoch", "end_time", "days", "lookback", "reading_step", "restart_in_window", "reset_in_window"],
|
|
121
|
+
"properties": {
|
|
122
|
+
"start_epoch": { "type": "number" },
|
|
123
|
+
"start_time": { "type": "string" },
|
|
124
|
+
"end_epoch": { "type": "number" },
|
|
125
|
+
"end_time": { "type": "string" },
|
|
126
|
+
"days": { "type": "number" },
|
|
127
|
+
"lookback": { "type": "string" },
|
|
128
|
+
"reading_step": { "type": "string" },
|
|
129
|
+
"restart_in_window": { "type": ["boolean", "null"] },
|
|
130
|
+
"reset_in_window": { "type": ["boolean", "null"] }
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"tableWrites": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"additionalProperties": false,
|
|
136
|
+
"required": ["schema_name", "table_name", "n_tup_upd", "n_tup_hot_upd", "n_tup_ins", "hot_share_pct", "window"],
|
|
137
|
+
"properties": {
|
|
138
|
+
"schema_name": { "type": "string" },
|
|
139
|
+
"table_name": { "type": "string" },
|
|
140
|
+
"n_tup_upd": { "type": ["integer", "null"] },
|
|
141
|
+
"n_tup_hot_upd": { "type": ["integer", "null"] },
|
|
142
|
+
"n_tup_ins": { "type": ["integer", "null"] },
|
|
143
|
+
"hot_share_pct": { "type": ["number", "null"] },
|
|
144
|
+
"window": { "type": "string" }
|
|
111
145
|
}
|
|
112
146
|
},
|
|
113
147
|
"data": {
|
|
@@ -125,5 +159,3 @@
|
|
|
125
159
|
}
|
|
126
160
|
}
|
|
127
161
|
}
|
|
128
|
-
|
|
129
|
-
|