postgres-best-practices

作成者: neondatabase

Postgresを扱う際のベストプラクティスとガイドライン。スキーマ設計、インデックス戦略、クエリ最適化、マイグレーション、よくある落とし穴をカバー。使用…

npx skills add https://github.com/neondatabase/postgres-skills --skill postgres-best-practices

Postgres Best Practices

Guidelines and best practices for working with Postgres, covering schema design, indexing, query optimization, and common pitfalls.

Supported Versions

This skill covers PostgreSQL 14 through 18. Version-specific features are tagged (e.g., [PG15+], [PG18+]); environment-dependent examples identify required privileges, extensions, or multi-node setup.

PostgreSQL provides 5 years of support per major version. Always run the latest minor release.

VersionInitial ReleaseEnd of Life
18September 2025November 2030
17September 2024November 2029
16September 2023November 2028
15October 2022November 2027
14September 2021November 2026

Source: postgresql.org/support/versioning

References

AreaResourceWhen to Use
Schema Designreferences/schema-design.mdDesigning tables, choosing data types, normalizing, partitioning
Indexingreferences/indexing.mdChoosing index types, composite indexes, partial/covering indexes
Query Optimizationreferences/query-optimization.mdReading EXPLAIN ANALYZE, fixing bottlenecks, planner tuning
Query Patternsreferences/query-patterns.mdCTEs, window functions, lateral joins, UPSERT, JSONB, anti-patterns
Performance Diagnosticsreferences/performance-diagnostics.mdpg_stat views, lock analysis, VACUUM, connection management
Logical Replicationreferences/logical-replication.mdPub/sub replication, live migrations, CDC
Hot Standbyreferences/hot-standby.mdStreaming replication, read replicas, failover
Transaction Isolationreferences/transaction-isolation.mdIsolation levels, lost updates, serialization failures, retry logic
Backup & Restorereferences/backup-restore.mdpg_dump/pg_restore, pg_basebackup, PITR, recovery
Security & Rolesreferences/security-roles.mdPrivileges, RLS, pg_hba.conf, authentication, SSL
Bulk Data Loadingreferences/bulk-loading.mdCOPY patterns, ETL staging, optimizing large loads, batch ops
Connection Poolingreferences/connection-pooling.mdPgBouncer config, pool modes, prepared statements, sizing
Major Version Upgradesreferences/major-version-upgrades.mdpg_upgrade, logical replication migration, pre/post checklists

neondatabaseのその他のスキル

claimable-postgres
neondatabase
ローカル開発、デモ、プロトタイピング、テスト環境向けの即時Postgresデータベース。アカウント不要。Neonアカウントにクレームしない限り、データベースは72時間後に期限切れとなります。
neon
neondatabase
Neonプラットフォームの概要。アプリやエージェント向けに、Postgres、Auth、Data API、および新サービス(オブジェクトストレージ、コンピュート関数、AIゲートウェイ)を網羅。"Neon"が言及された際に、Neonの操作方法や開始方法の概要として使用。それ以外の場合、個別機能がトリガーとなる:「オブジェクトストレージ」または「S3互換ストレージ」、「サーバーレス関数」、「バックグラウンドジョブ」または「データベース近くでコードを実行」、「AIゲートウェイ」、「LLMプロキシ」、「モデルルーティング」または「LLMを呼び出す」→...
apidatabasedevelopment
plugin-manager
neondatabase
このリポジトリのプラグイン構造と設定を、CursorとClaude Codeの両方で管理します。プラグインフォルダの作成、更新、レビュー時に使用してください…
skill-creator
neondatabase
効果的なスキルを作成するためのガイド。このスキルは、ユーザーがClaudeの機能を拡張する新しいスキルを作成(または既存のスキルを更新)したい場合に使用されるべきです。
using-neon
neondatabase
Neon Serverless Postgresを扱うためのガイドとベストプラクティス。はじめ方、Neonを使ったローカル開発、接続方法の選択、Neon…
neon-js-react
neondatabase
Reactアプリ(Vite、CRA)で認証とデータベースクエリを備えた完全なNeon SDKをセットアップします。型付きクライアントを作成し、データベース型を生成し、設定を行います…
neon-postgres-egress-optimizer
neondatabase
ユーザーがPostgresデータベースから過剰なデータ転送(エグレス)を引き起こすアプリケーション側のクエリパターンを診断し修正する手順を案内します。高いエグレス料金のほとんどは、アプリケーションが必要以上
neon-postgres-branches
neondatabase
このスキルの成果は、作成されたNeonブランチ(または作成が進められない場合の明確で実行可能な次のステップ)であるべきです。正しいブランチタイプを選択し、MCPまたはCLIを介してブランチ作成を実行します。