Database
Find Idle in Transaction Sessions in PostgreSQL
Mar 28, 2026 / · 4 min read · postgresql administration monitoring troubleshooting database pg_locks pg_stat_activity ·How to Find Idle in Transaction Sessions in PostgreSQL An idle-in-transaction session is a database connection that has started a transaction but is not currently running a query. It is just sitting there, holding the transaction open. This is different from a regular idle connection, which has no open transaction. …
Read MorePostgreSQL Developer Settings Query via pg_settings
Sep 5, 2025 / · 3 min read · postgresql database sql queries configuration developer tools system catalog database admin postgres pg_settings ·PostgreSQL Developer Settings Query: How to View Database Configuration Options This PostgreSQL query allows database administrators and developers to examine developer-specific configuration settings in their PostgreSQL database. The query targets the pg_settings system catalog to retrieve detailed information about …
Read MorePostgreSQL Authentication Settings Query for Admins
Aug 27, 2025 / · 3 min read · postgresql database authentication security sql scripts database management postgres configuration pg_settings ·PostgreSQL Authentication Settings Query for Admins Managing PostgreSQL at scale requires both fine-grained control and visibility into configuration parameters. One valuable system catalog, pg_settings, provides administrators direct insight into runtime parameters, defaults, and constraints that govern PostgreSQL’s …
Read Morepg_settings — Query PostgreSQL Configuration Parameters
Aug 26, 2025 / · 10 min read · postgresql database sql pg_file_settings pg_settings administration configuration tuning performance ·pg_settings — Query PostgreSQL Configuration Parameters The live configuration PostgreSQL is running with and the values written in postgresql.conf are not always the same. A parameter that requires a server restart has already been updated in the file but the old value is still in effect. A reload that produced a …
Read MoreMonitor PostgreSQL Active Sessions with pg_stat_activity
Aug 25, 2025 / · 10 min read · postgresql sql database monitoring performance queries pg_stat_activity postgres dba ·Monitor PostgreSQL Active Sessions with pg_stat_activity pg_stat_activity is the system view that shows every backend process running against a PostgreSQL server right now — one row per connection, with the client address, the query it is running, how long it has been running, and what kind of backend it is. A single …
Read MoreMonitor Running Queries in PostgreSQL using pg_stat_activity
Aug 18, 2025 / · 2 min read · postgresql database sql performance monitoring tuning optimization queries pg_stat_activity pg_locks ·Monitor Running Queries in PostgreSQL (9.2+ and Newer) Overview When managing a PostgreSQL database, one of the most important tasks for database administrators and developers is monitoring currently running queries. This helps identify problematic sessions, troubleshoot performance bottlenecks, and optimize …
Read MoreALTER SEQUENCE RESTART WITH in PostgreSQL — Examples
Aug 17, 2025 / · 2 min read · postgresql sql database database-maintenance postgres-sequences postgresql-scripting dba-tips database-tuning pg_class ·Restarting All PostgreSQL Sequences with SQL Script Database administrators often face challenges with PostgreSQL sequences, especially after data has been deleted or when tables have been re-imported. Sequences drive the generation of auto-incrementing values (like primary keys using SERIAL or BIGSERIAL), and …
Read MorePostgreSQL Lock Monitoring Uncover Query Details and Lock Age
Sep 2, 2024 / · 3 min read · PostgreSQL SQL Database Performance Monitoring pg_stat_activity pg_locks ·PostgreSQL Lock Monitoring: Gain Insights into Locks with Query and Age Purpose This PostgreSQL SQL query equips you to monitor locks held by active database sessions along with their associated queries and age. This detailed information proves invaluable for performance tuning, troubleshooting lock conflicts, and …
Read MoreIdentify & Resolve Blocking Application Locks in PostgreSQL
Sep 1, 2024 / · 3 min read · PostgreSQL SQL Database Performance Troubleshooting pg_locks pg_stat_activity ·PostgreSQL Lock Monitoring: Identify Blocking Locks and Resolve Application Conflicts Purpose In a busy PostgreSQL environment, transactions can sometimes become blocked, waiting for other transactions to release locks. This can slow performance and even cause stalls. This article dissects a powerful PostgreSQL script …
Read MorePostgreSQL Performance Monitoring: Identify Slow Queries
PostgreSQL: Identify Slow Running Queries in Real-Time Purpose This PostgreSQL SQL query provides a real-time snapshot of queries currently executing on your database that have been running for more than 30 seconds. It acts as a powerful alternative to a traditional slow query log, helping you proactively identify and …
Read More