The Postgres Operator easily lets you automate your Postgres in Kubernetes, whether it's one or thousands of instances.

Control Runaway Postgres Queries With Statement Timeout

submited by
Style Pass
2021-07-07 16:30:09

The Postgres Operator easily lets you automate your Postgres in Kubernetes, whether it's one or thousands of instances.

Integrated high availability PostgreSQL solution for enterprises with always on requirements.

Hardened, secure, access controlled PostgreSQL to meet advanced security requirements.

Most queries against a database are short lived. Whether you're inserting a new record or querying for a list of upcoming tasks for a user, you're not typically aggregating millions of records or sending back thousands of rows to the end user. A typical short lived query in Postgres can easily be accomplished in a few milliseconds or less. For the typical application, this means a well tuned production Postgres database is capable of easily running thousands or up to hundreds of thousands of queries per second on a beefy instance. 

But lying in wait is a query that can bring everything crashing to a crawl. I've far too often lived through these experiences and (hate to admit that) at times I have been the cause of the issues. Queries that run for too long are often going to create some cascading effects, most commonly these queries take one of four forms:

Leave a Comment