Brent Ozar hosts an outdoor Q&A session filmed at Seljalandsfoss waterfall in Iceland, answering community-voted DBA questions. Topics include whether AI will make junior DBAs obsolete, migrating to a 3-node Availability Group with minimal downtime, whether Googling basic syntax makes you underqualified, using MCP servers for DBA tasks, investigating root causes after Query Store plan forcing, risks of shrinking a 2TB database before migrating to Azure Managed Instance, and performance testing queries with table-valued parameters.
Nguồn: https://www.brentozar.com/archive/2026/06/video-office-hours-at-icelands-most-famous-waterfall. 8sync News chỉ tóm tắt và dẫn link; bản quyền nội dung thuộc tác giả và nguồn gốc.
Nhóm kỹ thuật GitGuardian đã giảm thời gian phản hồi p95 của dashboard từ 8 giây xuống 1 giây nhờ 5 tối ưu hóa PostgreSQL trên hệ thống Django, bao gồm: deferred JOINs bằng prefetch_related, đếm bất đồng bộ, replica đọc premium, cải tiến full-text search (pg_trgm), và denormalization để hỗ trợ composite indexes. Việc nâng cấp lên PostgreSQL 18 cũng mang lại lợi ích nhỏ. Họ sử dụng OpenTelemetry và EXPLAIN ANALYZE để theo dõi tiến trình.
Nếu bạn đang làm việc với ứng dụng backend sử dụng PostgreSQL và Django, bài viết này sẽ giúp bạn tìm hiểu cách tối ưu hóa hiệu suất dashboard hiệu quả bằng những kỹ thuật cụ thể, từ đó tiết kiệm thời gian và chi phí phát triển.
Postgres 19 bổ sung hỗ trợ sao chép logic (logical replication) cho sequences, vốn bị loại trừ suốt gần một thập kỷ do tính phi giao dịch. Tính năng mới tự động đồng bộ sequences tại các thời điểm xác định như tạo/refresh subscription, cùng công cụ hỗ trợ như hàm pg_get_sequence_data() và cột sync_seq_error_count. Cách tiếp cận này tương tự pglogical nhưng được tích hợp sẵn vào Postgres.
Lập trình viên cần đọc bài này để hiểu cách PostgreSQL 19 tự động đồng bộ hóa các chuỗi (sequences) trong cơ sở dữ liệu replication, giúp tránh lỗi thủ công và bảo đảm tính nhất quán khi chuyển đổi từ máy chủ sang subscriber mà không cần script bổ sung.
PostgreSQL checkpointer is a critical but often overlooked component. Two real production incidents are detailed — one causing a 40-hour outage due to 27 million unlinked files and inode exhaustion after a week-long checkpoint stall, and another causing an 8.5-hour standby loop in CloudNativePG on Kubernetes due to disk I/O saturation and a 60-minute startup probe timeout. Key lessons: never restart a database when checkpointer is lagging, keep checkpoint_timeout at its 5-minute default, enable log_checkpoints, and set an alarm if total checkpoint time exceeds 15 minutes. A LogQL query is provided to visualize checkpoint duration trends in healthy vs. unhealthy systems.
A practical walkthrough for migrating from MySQL to PostgreSQL, covering the full process: schema assessment, data type mapping (AUTO_INCREMENT, ENUM, unsigned integers, zero dates), SQL dialect rewrites (backticks, LIMIT syntax, IFNULL, GROUP_CONCAT, ON DUPLICATE KEY), stored procedure porting to PL/pgSQL, validation strategies, and low-downtime cutover using CDC. Includes copy-paste before/after SQL examples for common MySQL-isms and a comparison of migration tools (DBConvert, pgloader, AWS DMS).
PostgreSQL 17 and 18 introduced two planner GUCs — enable_group_by_reordering and enable_distinct_reordering — that allow the query planner to permute the keys of GROUP BY and SELECT DISTINCT operations to minimize comparison costs and avoid redundant sorts. Since column order in these clauses carries no semantic meaning, the planner can reorder keys based on cardinality and comparison cost statistics, or align them with existing sort orders to skip explicit sorts. Both default to on and are micro-optimizations that matter mainly for large multi-key operations. The primary diagnostic use case is a query that regressed after upgrading to PostgreSQL 17 or 18, where the plan shows a key order different from what was written. The recommended fix is usually improving statistics via ANALYZE rather than disabling the GUC permanently.
Datadog's engineering team migrated their Stream Router service from a key-value FoundationDB model to a relational PostgreSQL/DuckDB architecture while serving live production traffic. The migration used Claude and Cursor in a test-driven loop: for each method, they provided the old implementation, new schema, and a failing test, letting AI generate a first pass while tests served as the correctness oracle. Key enablers were modular interfaces, a comprehensive end-to-end test suite, and a blue/green deployment setup that validated the new system against live traffic for weeks before cutover. Results were dramatic: operations that took 45 minutes now complete in ~1 second, the routing dataset shrank 40x, latencies dropped by orders of magnitude, and database costs fell 90%. The post is candid about AI limitations: it consistently produced correct but unoptimized SQL, requiring human input for batching, UNNEST tricks, and CTEs. The core lesson: the quality of your test suite is the ceiling for how much you can trust AI-generated code.
Cloudflare has opened self-managed OAuth to all developers, allowing anyone to create OAuth applications and build integrations on top of the Cloudflare API. Previously, third-party OAuth was limited to a small number of manually onboarded partners. To make this possible, Cloudflare executed a zero-downtime migration of its underlying OAuth engine (Ory Hydra) from an older version to 2.X using a blue-green deployment strategy. Key engineering challenges included avoiding exclusive table locks during schema migrations (solved with CREATE INDEX CONCURRENTLY), handling refresh token invalidation issues, and preserving revocation events during the cutover window using Cloudflare Queues. The upgrade resulted in significant performance improvements: API P95 latency dropped 45% (185ms to 101ms), Go heap allocation fell 40%, and CPU usage dropped 37%.
postgres-mcp is an open-source MCP server that enables AI agents to safely troubleshoot and analyze PostgreSQL databases in production. It separates deterministic measurement (fixed diagnostic queries) from probabilistic reasoning (LLM interpretation), using restricted read-only transactions, grammar-level SQL validation via pglast, and execution time limits to prevent unsafe operations. Key capabilities include automated health checks covering indexes, buffer cache, connections, vacuum status, replication, constraints, and sequences. For workload analysis, it uses pg_stat_statements combined with hypopg to evaluate hypothetical indexes without physically creating them, employing an anytime greedy algorithm adapted from Microsoft's SQL Server tuning advisor. The post also covers practical deployment considerations including PgBouncer caveats, credential management, context window limits with large schemas, and the one-server-per-database architecture constraint.