ahmed6ww/ax-agents
Overview
This skill captures and applies OpenAI’s PostgreSQL scaling approach exactly from the OpenAI post "Scaling PostgreSQL to the next level" (January 22, 2026). It preserves all named technologies, numbers, dates, section order, and terminology from the source with strict fidelity. Use this skill when building, reviewing, or planning PostgreSQL architecture, partitioning/indexing, query optimization, schema migrations, replication, and load balancing.
How this skill works
The skill distills the source into operational guidance organized into the exact sections required by the source: Use Postgres for everything; Partitioning and indexing strategy; Query optimization; Schema management; Replication and load balancing; Results. It reports and enforces the key facts, technologies, metrics, and workflows from the source without adding outside recommendations or interpretations. If a detail is not in the source, it will explicitly state: Not stated in the source.
When to use it
- When designing platform strategy to keep PostgreSQL as the core datastore
- When planning distributed or analytical workloads requiring Citus or Citus columnar
- When addressing scaling from a baseline of over 4 billion queries per day and over 2,000 database instances
- When optimizing schemas and queries to support over 1 billion monthly users and over 800 million weekly users
- When implementing migrations, replication, and failover with strict source fidelity
Best practices
- Preserve section order and intent exactly as the source specifies
- Apply partitioning and indexing strategies from the source: hash partitioning for large event/log tables, time-range partitioning for append-only datasets, composite index strategy
- Use the named tools and integrations exactly: Citus, Citus columnar, PgBouncer, PgAnalyze, Patroni, Haste, pgroll, pgai
Example use cases
- Plan partitioning and indexing for high-throughput event tables using hash partitioning and composite indexes
- Design analytical pipelines using Citus and Citus columnar and dedicated analytical replicas
- Run migration workflows: canary rollout, async backfills with throttling and checkpointing, automatic rollback on failing health checks using Haste and pgroll
- Optimize query workload: deploy query fingerprinting, execution stats, EXPLAIN-based review workflows, statement-level timeouts and retries
- Build replication and failover: region-aware read replicas, replica lag monitoring and query shedding, failover orchestration with Patroni and PgBouncer integration
FAQ
The content captures OpenAI’s post "Scaling PostgreSQL to the next level" published January 22, 2026 at https://openai.com/index/scaling-postgresql/.
Does the skill add outside recommendations?
No. It preserves section order, names, numbers, and intent exactly; if a detail is not in the source it states: Not stated in the source.
What measurable impacts are reported in the source?
Reported impact includes 43% DB load reduction and 38% p95 latency reduction; platform handled over 4 billion queries every day and over 2,000 database instances, with traffic growth of about 2.5x in just over a year.
4 skills
This skill helps you apply OpenAI's PostgreSQL scaling best practices to architecture, partitioning, indexing, and replication for scalable, low-latency
This skill provides production-grade FastAPI best practices for project structure, async concurrency, validation, DI, and database patterns to improve
This skill helps you clean and refactor Python code while preserving behavior, removing dead code, and enforcing SOLID principles.
This skill guides structuring Next.js apps using Feature-Sliced Design and Server Components to improve scalability and maintainability.