April 2026 Summaries
4 posts from PlanetScale
Filter
Month:
Year:
Post Summaries
Back to Blog
Row Level Security (RLS) in Postgres provides a method for defining security policies at the database level, similar to assigning specific keys to areas within a house, to control access to data. While initially appealing for its promise of granular data protection, RLS introduces significant challenges, such as the complexity of testing and scaling policies, the difficulty of managing connections with tools like PgBouncer, and the risk of performance degradation due to repeated evaluations of security functions. The system also presents an increased attack surface where malicious users can exploit resource-intensive queries, potentially leading to a denial of service without proper application-level authorization checks. Additionally, managing RLS policies becomes cumbersome as they are not typically handled alongside code changes, causing potential drift and synchronization issues. This complexity often leads to the recommendation of implementing security at the application layer, using middleware or ORM-level scoping to ensure logic remains visible, testable, and efficient, thereby avoiding the pitfalls of RLS while maintaining robust data security.
Apr 30, 2026
2,401 words in the original blog post.
The article explores various approaches to implementing multi-tenancy in a PostgreSQL database, focusing on shared-schema, schema-per-tenant, and database-per-tenant methods. Multi-tenancy allows multiple customers (tenants) to use a single database infrastructure while maintaining data isolation. The shared-schema approach, where all tenants share the same database schema but isolate data with a tenant-specific column, is recommended for its simplicity and scalability. Despite the potential for security risks and operational complexities with schema-per-tenant and database-per-tenant methods, these offer increased data isolation, which may be suitable for specific use cases. The text also discusses the importance of protecting tenants from the "noisy neighbor" problem, where one tenant's resource usage affects others. Shared-schema is highlighted as the most scalable and efficient model when implemented with tenant-based data isolation techniques like partitioning, while schema and database-per-tenant models pose challenges in scaling due to increased operational overhead and connection limitations.
Apr 21, 2026
2,964 words in the original blog post.
The text discusses the challenges and solutions associated with maintaining a healthy Postgres queue, emphasizing the importance of efficient cleanup of dead tuples to prevent database degradation. Postgres, though traditionally used for various workloads, including job queues, faces unique problems when managing transient rows that are frequently inserted, read, and deleted. The Multi-Version Concurrency Control (MVCC) system in Postgres allows for multiple row versions, which can lead to "dead tuples" that require a vacuum process to clean up. The article highlights how overlapping transactions or long-running queries can hinder this cleanup process, potentially leading to performance issues. It explores several strategies, such as tuning autovacuum settings and utilizing Traffic Control for fine-grained resource management, to ensure that job queues operate efficiently alongside other workloads without causing a bottleneck. The piece underscores the necessity of maintaining a balance between different database operations to avoid a "death spiral" where the database becomes overwhelmed by dead tuples, ultimately impacting application performance.
Apr 10, 2026
3,939 words in the original blog post.
Josh Brown's article introduces Database Traffic Controlâ„¢, a tool for managing and prioritizing Postgres database traffic by attaching resource budgets to specific traffic slices, ensuring critical flows remain unaffected by other queries. The post explores practical implementation patterns using Go, focusing on tagging database queries with SQL comments for resource allocation. These patterns help isolate services and manage traffic in various scenarios, such as microservices, route-level tagging, feature deployments, tier-based limits in multi-tenant applications, and background jobs. By implementing these patterns, developers can set resource ceilings and avoid database overloads, thus preventing outages and maintaining a degraded experience instead. Traffic Control allows developers to observe query behavior in Warn mode before enforcing limits, providing a structured approach to managing database traffic and avoiding resource competition.
Apr 02, 2026
2,561 words in the original blog post.