Skip to content

Commit 618aaab

Browse files
committed
Update README.md
1 parent d61a488 commit 618aaab

1 file changed

Lines changed: 52 additions & 4 deletions

File tree

sandbox/postgres/README.md

Lines changed: 52 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ ORDER BY n.nspname, p.proname;
121121
Le Meta-Registry détecte les dérives entre l'intention architecturale et la réalité physique du catalogue. Il s'installe sur la même base :
122122

123123
```bash
124-
psql -U postgres -d marius -f meta_registry_v2.sql
124+
psql -U postgres -d marius -f meta_registry.sql
125125

126126
# ANALYZE est requis pour que la densité des colonnes varlena soit calculée
127127
# à partir des données réelles (pg_stats.avg_width). Sans ANALYZE, la matrice
@@ -144,7 +144,39 @@ ORDER BY component_name;
144144
-- Zéro TRUE dans les colonnes d'alerte = schéma conforme aux ADR.
145145
```
146146

147-
Voir `extended-containment-security-matrix.md` pour le guide complet.
147+
Voir `documentation/extended-containment-security-matrix.md` pour le guide complet.
148+
149+
### 5. Installation des outils `meta` (optionnel, recommandé)
150+
151+
Le répertoire `tools/` contient quatre outils d'ingénierie et d'audit qui s'appuient sur le Meta-Registry. Ils doivent être installés après l'étape 4 :
152+
153+
```bash
154+
# Générateur DDL aligné CPU
155+
psql -U postgres -d marius -f tools/f_generate_dod_template.sql
156+
157+
# Compilateur AOT de la vue de profil ECS
158+
psql -U postgres -d marius -f tools/f_compile_entity_profile.sql
159+
160+
# Vue d'audit de performance (HOT / BRIN / bloat)
161+
psql -U postgres -d marius -f tools/v_performance_sentinel.sql
162+
163+
# Vue de santé globale (agrège ECSM + sentinel)
164+
psql -U postgres -d marius -f tools/v_master_health_audit.sql
165+
```
166+
167+
Premier lancement après installation :
168+
169+
```sql
170+
-- Compiler la vue de profil ECS (à relancer après tout ajout de composant)
171+
SELECT meta.f_compile_entity_profile();
172+
173+
-- Vérifier le sentinel (requiert ANALYZE au préalable)
174+
SELECT component_id, hot_blocker_alert, brin_drift_alert, bloat_alert
175+
FROM meta.v_performance_sentinel;
176+
-- Zéro TRUE = schéma conforme aux invariants de performance.
177+
```
178+
179+
Voir `documentation/meta_tooling_guide.md` pour le guide complet des trois outils.
148180

149181
### 5. Séquence complète (environnement CI/CD)
150182

@@ -154,7 +186,7 @@ psql -U postgres -f master_schema_ddl.pgsql
154186
psql -U postgres -d marius -f master_schema_dml.pgsql
155187

156188
# Meta-Registry
157-
psql -U postgres -d marius -f meta_registry_v2.sql
189+
psql -U postgres -d marius -f meta_registry.sql
158190
psql -U postgres -d marius -c "ANALYZE;"
159191

160192
# Suite de tests (requiert pgTAP)
@@ -310,6 +342,21 @@ psql -U postgres -d marius -c "SELECT * FROM meta.v_extended_containment_securit
310342

311343
Zéro alerte `TRUE` = schéma conforme.
312344

345+
### Surveiller les régressions de performance
346+
347+
```sql
348+
-- HOT-blockers, BRIN-drift et bloat en un seul appel
349+
SELECT component_id,
350+
hot_blocker_alert, hot_blocker_cols,
351+
brin_drift_alert, brin_worst_col, brin_correlation,
352+
bloat_alert, observed_bytes_per_tuple, bloat_threshold_bytes
353+
FROM meta.v_performance_sentinel
354+
WHERE hot_blocker_alert OR brin_drift_alert OR bloat_alert = TRUE;
355+
-- Zéro ligne = invariants de performance respectés.
356+
```
357+
358+
Requiert `ANALYZE` préalable pour que `pg_stats.correlation` et `n_live_tup` soient fiables.
359+
313360
### Surveillance des dead tuples
314361

315362
```sql
@@ -399,7 +446,8 @@ L'enjeu est la **résidence en RAM** du hot path. Pour un site de 5 000 articles
399446
## Références
400447

401448
- [Architecture Decision Records](./architecture_decision_records.md)
402-
- [Extended Containment Security Matrix — Guide](./extended-containment-security-matrix.md)
449+
- [Extended Containment Security Matrix — Guide](./documentation/extended-containment-security-matrix.md)
450+
- [Outils Meta — Mode d'emploi](./documentation/meta_tooling_guide.md)
403451
- [PostgreSQL 18 — Async I/O](https://www.postgresql.org/docs/18/runtime-config-resource.html)
404452
- [PostGIS — ST_DWithin / opérateur KNN](https://postgis.net/docs/ST_DWithin.html)
405453
- [schema.org — Person](https://schema.org/Person) · [Article](https://schema.org/Article) · [Organization](https://schema.org/Organization) · [Order](https://schema.org/Order)

0 commit comments

Comments
 (0)