mir-database-postgres

Solid

Make It Right (PostgreSQL module). Postgres mechanics the engine-agnostic pillar omits: which ALTER TABLE subforms take ACCESS EXCLUSIVE and the lock queue where a blocked DDL stalls every read behind it; lock_timeout/statement_timeout migration discipline; NOT VALID then VALIDATE; CREATE INDEX CONCURRENTLY and invalid-index cleanup; MVCC bloat, autovacuum, XID wraparound; isolation levels and 40001/40P01 retry; SELECT FOR UPDATE vs FOR NO KEY UPDATE, SKIP LOCKED queues, advisory locks; b-tree/GIN/GiST/BRIN choice, partial and covering indexes, why an index is unused; PgBouncer pooling modes and transaction-pooling breakage; RLS multi-tenancy and its bypass paths. Chains: mir-database (the gates) → this. TRIGGER when the engine is PostgreSQL or Postgres-compatible (RDS/Aurora, Cloud SQL, Neon, Supabase) and the task writes DDL, a migration, an index, a locking or isolation decision, a partitioning or RLS layout, or diagnoses a slow query, EXPLAIN plan, missing index, bloat, vacuum, deadlock, or connection poo

API & Backend 15 stars 0 forks Updated 1 weeks ago Apache-2.0

Install

View on GitHub

Quality Score: 81/100

Stars 20%
40
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# /mir-database-postgres · Make It Right (PostgreSQL) Bottom tier of a two-tier chain: `mir-database` decides **what is true of the data** (any engine) → **this** carries Postgres mechanics. Run the gates first. Reach for this at Gate 5 (design decisions that depend on lock behaviour and index types), Gate 6 (DDL), and Gate 7 (review). **Engine state, verified 13 August 2026.** | Release | Status | What matters | |---|---|---| | **18** (18.4, released 2026-05-14) | current stable | Async I/O (`io_method`); b-tree **skip scan**; `uuidv7()`; generated columns default to **VIRTUAL**; `NOT NULL` stored in `pg_constraint` so it can be named and marked `NOT VALID`; `WITHOUT OVERLAPS`/`PERIOD` temporal constraints; `NOT ENFORCED` CHECK/FK; `OLD`/`NEW` in `RETURNING`; data checksums on by default; `pg_upgrade` keeps planner statistics; `VACUUM`/`ANALYZE` now recurse into partitions unless you write `ONLY`; `idle_replication_slot_timeout` | | 17.10 · 16.14 · 15.18 · 14.23 (all 2026-05-14) | supported | 14 reaches **end of life 12 Nov 2026** — plan the upgrade now | | 13 and older | end of life | no security patches | | **19** | **Beta 2** (2026-07-16), no GA date confirmed at time of writing | `REPACK` / `REPACK CONCURRENTLY` in core, `MERGE`/`SPLIT PARTITIONS`, parallel autovacuum, `pg_stat_lock`, `log_lock_waits` on by default, JIT off by default, logical sequence sync. Do not design against a beta | Run the current minor. The May 2026 batch (CVE-2026-6472 … CVE-2026-6638) and t...

Details

Author
anantbhandarkar
Repository
anantbhandarkar/make-it-right
Created
3 months ago
Last Updated
1 weeks ago
Language
Python
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

API & Backend Solid

mir-database-mongo

Make It Right (MongoDB module). MongoDB 8.x mechanics the engine-independent pillar omits: embed vs reference decided per relationship by access pattern, cardinality, update frequency; the 16 MB BSON limit and unbounded arrays; $jsonSchema validators — a collection accepts any shape until you add one; write concern w:1 losing acknowledged writes on failover; read concern, stale secondary reads, retryable writes — updateMany/deleteMany are NOT retryable; the 60-second transaction lifetime limit vs a single-document atomic update; compound-index prefix rules, ESR ordering, covered queries; aggregation stage ordering and the 100 MB stage limit; shard-key selection — a monotonic key creates a hot shard; NoSQL operator injection. Chains: mir-database (the gates) → this. TRIGGER only when the datastore is MongoDB itself (Community, Enterprise, Atlas) — designing a collection or document schema, picking a shard key, writing an aggregation pipeline or index, or debugging a Mongo consistency, concurrency, or query-pla

15 Updated 1 weeks ago
anantbhandarkar
API & Backend Solid

mir-database

Make It Right (database pillar). Constraint-first schema and data-modeling protocol. Decides what is TRUE of the data before the first CREATE TABLE. Forces explicit decisions on cardinality and ownership, natural vs surrogate keys, what the database enforces vs what the application enforces, deliberate denormalization, nullability as a domain statement, soft delete's effect on uniqueness and foreign keys, tenancy model (shared-schema tenant column, schema-per-tenant, database-per-tenant), index design driven by the actual query set, and migration safety on populated tables. Runs the hard-gated pipeline: Intent → Constraint Interrogation → Assumption Ledger → Invariants & Enforcement Boundary → Risk Register → Design Review → DDL/Migration → Production-Readiness. Engine-independent. Chains: this → an engine module. TRIGGER when the task designs or changes a schema, data model, keys, constraints, indexes, tenancy layout, or a migration against populated tables. SKIP for application business logic, transaction/i

15 Updated 1 weeks ago
anantbhandarkar
API & Backend Solid

mir-backend-python-django

Make It Right (Django module). Django 6.1 / 5.2 LTS + Django REST Framework specific reliability augmentation. Use alongside the mir-backend skill when the target stack is Django — it carries the mechanical footguns that the framework-agnostic skill deliberately omits: ORM N+1 with select_related/prefetch_related and the new QuerySet.fetch_mode() (FETCH_PEERS / FETCH_RAISE), queryset laziness and result caching, migration safety on populated tables (lock_timeout, AddIndexConcurrently, db_default), transaction.atomic() and on_commit() boundaries, mass assignment through ModelForm and DRF serializers, async views and the async ORM (transactions do NOT work in async; CONN_MAX_AGE must be off), the built-in django.tasks background framework added in 6.0, signal side-effect traps, and Django's own 2026 security advisories. TRIGGER only when the Python backend stack is Django — building, reviewing, or debugging a Django view, model, serializer, migration, task, or admin. Always loads TOGETHER WITH mir-backend (the

15 Updated 1 weeks ago
anantbhandarkar