Long-running transactions are a common but overlooked cause of rising CDC source latency in AWS DMS migrations. When a transaction stays open, DMS must buffer all subsequent changes until it commits, causing latency to climb from seconds to hours. This post explains how DMS processes transactions, how to diagnose latency spikes, and provides ready-to-use bash monitoring scripts for Oracle, PostgreSQL, MySQL, and SQL Server. The scripts detect transactions exceeding a configurable threshold (default 15 minutes), send alerts via Amazon SNS, enforce TLS/SSL connections, retrieve credentials from AWS Secrets Manager, and filter false positives. A step-by-step Oracle demo shows the full workflow from DMS task setup to alert receipt. Scheduling via crontab enables continuous proactive monitoring.
Nguồn: https://aws.amazon.com/blogs/database/manage-long-running-transactions-for-aws-dms-performance. 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.
Di chuyển từ kiến trúc monolith sang microservices cần áp dụng các pattern cụ thể thay vì …
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.
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.

Having tens of thousands of tables in a single PostgreSQL database can cause serious memory and performance problems. Each long-lived backend connection caches metadata for every relation it touches in CacheMemoryContext, which has no size limit. A test with 20,000 tables shows this cache growing from ~4 MB to 221 MB after querying all tables. Additionally, PostgreSQL system catalog tables (pg_class, pg_attribute, etc.) balloon in size, slowing down metadata queries like those used by PostGIS views. Mitigations include setting idle_session_timeout to recycle connections, reducing table count through schema redesign, and simplifying expensive metadata views. The root fix is keeping the number of database objects moderate.

Part 2 of a series on disaster recovery as a process rather than a tooling problem. Covers why runbooks fail in practice (stale commands, vague instructions, no rollback criteria, unclear ownership) and what good runbooks look like: procedural, deterministic, with pre-flight checks and rollback paths. Introduces non-technical essentials like incident commander and communications owner roles, stakeholder notification cadence, and risk authorization. Explains how to run game days (DR drills) progressively — from basic failover practice to chaos scenarios — and what to measure beyond binary success. Closes with a cultural argument against blame-heavy post-mortems, emphasizing that lower RTO is built through practice, not purchased through tooling.
ClickHouse's product manager investigates a Databricks keynote benchmark that claimed ClickHouse 'crashed' under load during the Reyden announcement. The author attempts to reproduce the crash using TPC-H SF1 data and finds ClickHouse does not crash — it gracefully rejects queries at a configurable concurrency limit. The post argues the Databricks benchmark was opaque, used tiny datasets (fitting in iPhone memory), provided no hardware or configuration details, and was run on a product competitors cannot yet access. The author demonstrates that with proper node sizing (35 nodes for 15K QPS), ClickHouse handles the load without tuning. The broader argument is that benchmarks must be open, reproducible, and detailed to be meaningful, contrasting Databricks' approach with ClickHouse's public GitHub benchmark repository.
PostgreSQL's enable_incremental_sort GUC controls a feature introduced in PG13 that exploits presorted index data to sort smaller batches instead of the full dataset. This pairs well with LIMIT queries and keeps sorts in memory. However, the planner can misestimate costs on skewed data where one prefix value dominates, leading to worse performance than a plain full sort. Diagnosis involves checking EXPLAIN ANALYZE for large gaps between estimated and actual time on the Incremental Sort node. The fix is usually better statistics (higher statistics target or extended statistics), not leaving the GUC disabled. A related but distinct GUC, enable_presorted_aggregate (added in PG16), controls a similar optimization for GROUP BY aggregation and is a common source of confusion when troubleshooting sort regressions.
MCP for PostgreSQL là một MCP server mã nguồn mở giúp các tác nhân AI tự động kiểm tra sức khỏe và phân tích hiệu suất cơ sở dữ liệu PostgreSQL trong môi trường sản xuất. Nó tách biệt các phép đo xác định (truy vấn chẩn đoán cố định) khỏi suy luận xác suất (LLM), sử dụng giao dịch chỉ đọc, xác thực SQL cấp độ ngữ pháp qua pglast và giới hạn thời gian thực thi để đảm bảo an toàn.
Lập trình viên phát triển ứng dụng PostgreSQL nên đọc bài này để hiểu cách tự động hóa và an toàn hóa quá trình phân tích hiệu suất cũng như kiểm tra sức khỏe cơ sở dữ liệu, từ đó tối ưu hóa hiệu năng và giảm thiểu rủi ro khi sử dụng AI trong việc debug và tối ưu hóa.