When most people start working with PostgreSQL, they quickly learn SQL:
SELECT * FROM employees;
But very soon, another world opens up inside psql — a set of commands that don’t look like SQL, don’t end with semicolons.
These are PostgreSQL Meta Commands, and they quietly power the daily workflow of almost every experienced DBA.
Meta commands are not about querying data — they are about navigating, inspecting, and controlling the PostgreSQL session/database efficiently.
What exactly are Meta Commands?
Meta commands are special instructions interpreted by psql, not PostgreSQL itself.
That means:
They are not SQL
They execute instantly on the client side
They are specific to the psql terminal tool
They do not end with semicolon like SQL statements
The main focus area for meta commands is database interaction and not the interaction with the data in the database.
Cheat Sheet (Quick Reference)
The most commonly used meta commands are as follows. There are many more apart from these, however, below are the most frequently used ones:
Connect and Manage Sessions
These commands help discover databases, establish connections, and verify the current session.
\c
Connect to another database
\l
List all the databases available in the cluster
\l+
List all the databases available in the cluster with more details, like DB Size, etc
\conninfo
Displays information about the current database connection
Please find the example of the commands used to connect and manage sessions in the screenshot below:
Inspect Database Objects
The\d family of commands is one of the most powerful features of psql. These commands can be used to discover database objects, inspect their definitions, and view additional metadata.
\d
Describe database objects or list objects visible in the current search path.
\d object_name
Describe a specific table, view, sequence, or other database object.
\d+ object_name
Display extended information about an object.
\dt
List tables. Supports schema names and wildcard patterns.
\di
List indexes. Supports wildcard patterns.
\dn
List schemas in the current database.
\du
List database roles.
\db
List tablespaces
\dx
List installed extensions
\df
List functions and procedures
\sf function name
Displays the source code of the specific function/procedure
Using object names and wildcards
Most object-inspection commands accept object names, schema-qualified names, and wildcard patterns.
For example:
\dt
Lists all tables in the current search path.
\dt public.*
Lists all tables in the public schema.
The same pattern matching is supported by several other meta-commands, including \di, \df, and the \d family.
Please find the example of the \d familycommands in the screenshot below:
Format Query Results
Several meta-commands are available to improve the readability of query output, particularly when working with wide result sets.
\x [on|off|auto]
Toggle expanded (vertical) display
\o filename
Redirect query output to a file or pipe.
\o
Restore query output to the terminal.
Monitor Query Executions
These commands assist in measuring query performance and repeatedly executing queries for monitoring purposes.
\timing [on|off]
Toggle Query execution timing
\watch seconds
Re-execute the current query at the specified interval
Execute and Automate tasks
These commands simplify repetitive tasks and enable integration between psql, SQL scripts, and the operating system
\i filename
Execute the commands from the file
\gexec
Execute each field returned by a query as an SQL statement.
\! command
Execute a shell command without leaving a psql prompt
Get Help
Built-in help commands provide quick access to both psql meta-command documentation and PostgreSQL SQL syntax without leaving the terminal.
\?
Display all available psql meta-commands.
\h
List SQL commands for which syntax help is available.
\h command
Display syntax help for a specific SQL command.
What is .psqlrc?
.psqlrc is a startup file in the home directory that psql reads when a session begins. It can hold meta-commands and SQL that run before the first prompt. The main benefit is consistent defaults — timing, formatting, and a custom prompt — without repeating setup each time, which speeds daily work and reduces connection mistakes across databases.
A minimal .psqlrc might look like this:
\timing on
\x auto
These settings load automatically on every newpsql session as highlighted below:
Conclusion
PostgreSQL is powerful because of SQL — but for DBAs, psql meta commands make daily management far easier and more efficient.
Most developers use only a handful like \dt or \d. But experienced DBAs rely on a much broader toolkit to:
Investigate production issues faster
Navigate systems efficiently
Reduce reliance on repetitive SQL
Repetitive tasks can be automated
Debug complex problems quickly
An easy way to understand the relationship between SQL and PostgreSQL meta commands is to compare them to driving a car.
SQL is like driving the car — it is the primary means of reaching a destination. It is used to retrieve, insert, update, and delete data, enabling applications and users to interact with the information stored in the database.
Meta commands, on the other hand, are like the car’s dashboard. While the dashboard does not move the vehicle, it provides essential information such as speed, fuel level, engine health, navigation status, and warning indicators. Driving without a dashboard is certainly possible, but it would mean operating with limited visibility into the vehicle’s condition and performance.
Similarly, SQL is responsible for manipulating and retrieving data, whereas PostgreSQL meta commands provide valuable insight into the database environment itself. They help administrators inspect database objects, navigate schemas, monitor sessions, examine roles and privileges, review object definitions, and perform numerous administrative tasks efficiently.
In essence, SQL enables interaction with the data, while meta commands enable interaction with the PostgreSQL environment. Together, they form a complementary toolkit that allows database professionals to work more effectively, troubleshoot issues faster, and administer PostgreSQL with greater confidence.
ABILENE, KS — Romance was in the air at the Farris household as wife Allison was seen getting ready for bed without her mouthguard in place.
Mr. Aaron Farris, who had just finished brushing his teeth, felt a jolt of excitement as he noticed his wife had gotten ready for bed without the thick piece of plastic that keeps her from grinding her teeth like a chainsaw.
"Oh man, it’s so on. Play it cool, Aaron," said Mr. Farris to himself. "Let me double-check. Yup, mouthguard is out. Like the married version of candlelight and Marin Gaye. Little extra mouthwash, and we’ll be good to go."
As he prepared to get in bed, Farris made an extra show of not putting on his CPAP machine. "Mm, think I’m going to stay up for a bit," announced Farris to his wife. "Yeah, sleep apnea can wait. Got, um, something else on my mind."
At publishing time, Farris was sure he’d read the signals correctly as he discovered his wife also wasn’t wearing her standard woolen socks.
Rumors swirl about the current condition of Senator Mitch McConnell, but his staff have come out to say that even if he were dead he will still be able to finish his term.
Two weeks ago, we announced that Doltgres 1.0 is coming August 6th. In that post, we laid out the four things we’re focused on to get there: correctness, storage format stability, performance, and compatibility. Correctness was measured by one very concrete number: 99% compliance on our SQL Logic Test suite. At the time we were sitting at a little over 96%. Today, we’ve hit our target: Doltgres passes 99% of the suite. That’s one more box checked on the road to 1.0. 🎉
SQL Logic Test is a test suite originally built for SQLite, containing millions of statements and queries that exercise SQL expressions, joins, aggregates, and type coercion rules. We forked it years ago and extended it with more tests to measure how correctly Dolt (and now Doltgres) execute SQL statements. The test suite in SQL Logic Test specifically stress tests the expression support in each engine. 99% represents millions of individual queries whose results have to match PostgreSQL exactly, down to the type and formatting of every returned value. This gives us a high confidence that Doltgres can correctly execute a wide range of statements and expressions.
Before we could chase down our own bugs, we needed to answer a more basic question: how many of these tests are even valid against PostgreSQL? The suite was originally written for SQLite, and over the years it’s been adapted and extended for MySQL as we’ve used it to test Dolt. Postgres has never been the primary target, so we couldn’t assume the entire test suite would execute cleanly against Postgres.
We pointed our test runner at a real PostgreSQL server and ran the full suite against stock PostgreSQL first, to establish a baseline of how compatible the tests actually were with Postgres. That baseline surfaced a number of places where the tests themselves (or in many cases, the runner’s expectations about results) were still encoding SQLite or MySQL behavior and not compatible with slightly different behavior in Postgres. Fixing those was a prerequisite before we could start figuring out what changes were needed in Doltgres.
A few examples of what we found and fixed:
Integer vs. float schema types. The test format encodes an expected type for each result column (I for integer, R for float/real), based on SQLite’s type affinity rules. Postgres is stricter about numeric types than SQLite, so expressions SQLite treats as integers may legitimately come back as floats from Postgres, and vice versa. We updated the runner’s schema comparison to treat I and R as compatible in both directions, and to normalize whole-number floats (like 3.000) to integer formatting (3) so the value comparison succeeds when the underlying values genuinely match. Limiting this to whole-number floats only means we still detect correctness errors if the values don’t logically match, but we’re more flexible on the returned result type so that we can use the same tests to match against Postgres.
Empty result sets. SQLite reports SQLITE_NULL as the type for every column when a query returns zero rows, which doesn’t correspond to anything meaningful in Postgres. We updated the runner to skip schema-type verification entirely when both the expected and actual result sets are empty, since there’s nothing to compare.
Postgres-specific type names in the harness. Our test harness inspects the driver’s reported column types to decide how to parse and compare each value. It was written with MySQL’s type names in mind (INT, BIGINT, DECIMAL, and so on), so it didn’t know what to do with Postgres-specific names like BOOL, INT2, or FLOAT4. We filled in the missing cases so those types get parsed and compared correctly instead of falling through and failing.
MySQL-only statements. Some tests exercise MySQL-specific syntax or behavior that has no Postgres equivalent at all. Rather than force those through, we added skip directives so they’re excluded when running against Doltgres, the same way we already skip SQLite-specific tests.
In addition to those improvements, we also invested in running the suite in parallel, spinning up a single shared Doltgres server and fanning test files out across concurrent workers, each against its own isolated database. At the scale of millions of test queries, that’s the difference between a test run that takes minutes and one that takes hours, which matters a lot when you’re iterating on fixes.
With those changes in place, we could now run the SQL Logic Tests against a real PostgreSQL server and get over 99% correctness. There are still some issues for the test suite to run 100% against PostgreSQL, and we’ll keep chipping away at those in future passes. After these improvements, the remaining test failures with Doltgres were much more likely to be real Doltgres bugs that we needed to dig into. The most interesting was in our COALESCE() implementation: when called with mixed numeric types (say, an int4 and an int8, or an int4 and a float8), it was using a generic type conversion instead of Postgres’ assignment cast rules to compute the common type. That’s an important distinction. Assignment casts are what Postgres itself uses to widen mixed-type arguments to a common type, and using the wrong conversion path meant we could return incorrectly typed or incorrectly rounded results for a fairly common pattern in real SQL.
Correctly executing 99% of the SQL Logic Test suite was our target for Doltgres’ 1.0 release. It gives us high confidence that a wide range of statements and SQL expressions are executing correctly in Doltgres. By baselining the test suite against PostgreSQL, we discovered that we were closer to this milestone than we initially expected. We thought we still had many remaining gaps to fill to reach that milestone, but it turned out that how the results were being processed by the test runner accounted for most of the gap.
Executing queries correctly, and returning identical results as PostgreSQL, is the foundation for our 1.0 launch. Without correct query execution, the other goals, like fast execution of queries and tool compatibility, just don’t matter. Overall, we’re making great progress on our 1.0 punch list and remain on track for August 6th.
If you’re running Doltgres and you hit a query that returns the wrong result, an error you don’t expect, or behavior that just doesn’t match Postgres, please send us a GitHub issue and let us know. We want to find and fix as many of these as possible before 1.0 ships, and customer-reported issues go straight to the top of our queue.
If you haven’t started using Doltgres yet, give it a shot! You can install Doltgres by running brew intall doltgres on a Mac with Homebrew, or you download a binary from our GitHub releases. Our dev team hangs out on the DoltHub Discord server every day, so feel free to come by and tell us how it’s going. We’re closing in on 1.0 and every bit of feedback helps us get there!
Bob — a Laravel & PHP coding assistant built on Qwen2.5-Coder 7B, customized with official Laravel documentation (v10–v13) and a senior-architect persona.
Overview
Model
qwen2.5-7b-laravel-coder
Base
qwen2.5-coder (7B)
Persona
Bob — senior PHP/Laravel specialist
Laravel
10.x, 11.x, 12.x, 13.x (version-aware)
Focus
PHP & Laravel ecosystem only
Bob detects your Laravel version from composer.json, bootstrap/app.php, and project patterns, then gives version-specific answers. He follows PSR-12, flags common pitfalls (N+1 queries, mass assignment, missing indexes), and declines topics outside PHP/Laravel.
Quick start
ollama pull bhavingajjar/qwen2.5-7b-laravel-coder
ollama run bhavingajjar/qwen2.5-7b-laravel-coder
Over 2000 drones took to the skies over Seoul, Korea, to celebrate the Star Wars universe. The eye-popping, 10-minute show featured flying formations of the iconic Star Wars Logo, the Millennium Falcon, Luke Skywalker, Darth Vader, R2-D2, BB-8, Stormtroopers, Din Djarin and Grogu, and more. They even programmed the drones to display video footage.
For developers starting their journey, getting practical experience can be a chicken-and-egg problem. Without hands-on exposure to real projects, it’s difficult to build the skills needed to land opportunities. Yet, without those opportunities, gaining experience feels impossible. This is where open-source projects become a godsend.
By exploring and contributing to these projects, you not only learn how professional applications are built but also get a chance to see how seasoned developers solve real-world problems.
Even for experienced developers, exploring open-source projects can be incredibly valuable. These projects offer a chance to see diverse coding styles, learn advanced techniques, and discover innovative ways of solving complex problems.
Laravel is one of the most popular PHP frameworks for building modern web applications. While tutorials and documentation provide a great foundation, diving into real-world open-source projects can offer invaluable insights into best practices, architecture, and advanced features of Laravel.
Below, I’ve compiled a list of notable Laravel-based projects, along with descriptions and learning opportunities for each.
Let’s dive in. 👇
1. Cachet
Cachet is an open-source status page system for monitoring and displaying service uptime.
Building custom management systems for niche industries.
Integrating third-party APIs for payments and notifications.
Handling real-time order tracking and updates.
Exploring these projects offers a fantastic opportunity to see Laravel in action. By reviewing the codebases, you can understand how seasoned developers structure their applications, solve complex problems, and use Laravel’s rich ecosystem to build robust solutions.
In this post, we show you how long-running transactions affect AWS Database Migration Service (AWS DMS) change data capture (CDC) latency, walk through monitoring approaches for Oracle, PostgreSQL, MySQL, and SQL Server, and provide ready-to-use scripts to identify and resolve problematic transactions before they impact your replication performance.
Long-running transactions are one of the most common and often overlooked causes of rising CDC source latency during AWS Database Migration Service (AWS DMS) migrations. When a database transaction stays open for hours instead of seconds, DMS must hold its replication position, buffering all subsequent changes until that transaction commits. The result is a cascading delay across all pending changes that can stall your migration pipeline right when low latency matters most, during your final cutover window. At that point, every minute of replication delay translates directly to extended downtime and higher migration risk.
By detecting these transactions early, you can avoid unnecessary replication instance scaling, reduce cutover downtime, and keep migration on schedule.
DMS source latency
When working with AWS DMS, source latency (CDCLatencySource) is a key metric. It measures the delay between the commit time of the last event captured from the source endpoint and the current system timestamp of the replication instance. In other words, it measures how far behind the replication instance is from the latest committed change at the source. Lower latency indicates healthier replication performance.
Several factors contribute to elevated source latency: an uncommitted transaction prevents DMS from applying/forwarding changes to the target, network throughput limitations between source and replication instance, source database performance bottlenecks, and heavy workload during peak processing times. These issues often interconnect, compounding their impact on replication performance.
To troubleshoot effectively, analyze latency patterns over time at hourly, daily, and weekly intervals. This helps you distinguish between temporary spikes during expected peak periods and systematic issues that indicate underlying problems.
The path to resolving source latency isn’t always straightforward, but it typically involves investigating six key areas:
High database workload
Network connectivity issues
Insufficient system resources
Large transaction volumes
Long-running transactions
Archival log processing delays
Each of these factors requires a different troubleshooting approach. Pinpointing the exact root cause before initiating remediation is essential for an effective fix. For the scope of this post, we focus on long-running transactions.
Long-running transactions
Long-running transactions are database operations that remain open for minutes or even hours. In AWS DMS, they can cause significant replication delays.
When a transaction stays open, DMS must retain all transaction log entries from the point that transaction began. For example, if a transaction opens at 9:00 AM and does not commit until 11:00 AM, DMS preserves two hours of log data. This increases storage consumption and memory usage on the replication instance.
The open transaction also blocks DMS from advancing its log-reading position. All changes that commit after the open transaction must wait in queue, causing CDC source latency to climb steadily. In high-transaction environments, a single long-running transaction can create a backlog that takes hours to clear after the transaction finally completes.
Common causes include complex queries processing large datasets, batch operations that run longer than expected, application code that holds transactions open unnecessarily, and missing commit or rollback statements. Each cause calls for a different troubleshooting approach.
To reduce the impact, set up automated monitoring to detect open transactions that exceed a defined threshold. Keep transaction duration as short as possible by optimizing application code and committing frequently. Avoid user interaction within open transactions. Also make sure the replication instance has sufficient storage and computing resources to handle temporary backlogs.
Some long-running transactions are unavoidable for certain business operations. The goal is not to eliminate them entirely but to detect them early and prevent them from stalling your replication pipeline.
How long-running transactions impact DMS source latency
Long-running transactions directly impact your AWS DMS CDC source latency. Identifying them is the first step to troubleshooting performance issues.
How DMS processes transactions
When DMS operates in CDC mode, it captures changes from the source database’s transaction logs (such as Oracle redo logs, SQL Server transaction logs, PostgreSQL WAL, or MySQL binlogs). However, DMS can only capture and replicate committed transactions to maintain data consistency.
A bottleneck forms because DMS cannot skip past the open transaction:
CDCLatencySource increases from seconds to potentially hours.
CDCIncomingChanges accumulates.
CDCChangesMemorySource or CDCChangesDiskSource increases as DMS buffers pending changes.
For instance, consider a batch job that starts a transaction at 10:00 AM and runs for 2 hours without committing. Any changes captured during that window cannot be applied to the target until the transaction commits at 12:00 PM. The DMS replication task is the unit of work responsible for reading the source transaction log and applying changes to the target. During this period, the task buffers all subsequent changes it has read, regardless of whether those changes involve related tables. It maintains transactional ordering within its scope, so no captured changes can be applied until the open transaction completes at noon. This creates a significant replication delay that grows proportionally with the transaction’s duration.
Diagnostic approach
Identifying long-running transactions helps you differentiate between DMS configuration issues and database-level problems when diagnosing source latency. This identification process follows a systematic approach:
Initial investigation: Monitor CDCLatencySource to identify when replication is falling behind, then investigate replication instance metrics and source database open transactions to determine the root cause.
Root cause analysis: Use monitoring scripts to identify active long-running transactions and correlate transaction start times with CDCLatencySource spikes. Track specific identifiers such as Oracle SCN (such as 12345678) or SQL Server LSN (such as 0000000A:00000B00:0001).
Targeted solutions: Once identified, you can request a commit or rollback from the application team, optimize the logic to use smaller transaction batches, or implement transaction timeout policies.
Without identifying these long-running transactions, teams often waste time tuning DMS task settings (like MemoryLimitTotal or parallel threads) or scaling up replication instances unnecessarily, when the actual solution requires addressing the source database’s transaction management practices. The monitoring scripts thus serve as a diagnostic bridge between observing DMS performance symptoms and pinpointing their database-level causes.
Queries to identify long-running transactions
To proactively manage this issue, implementing alerts for long-running transactions is essential. Here are the monitoring queries for each database engine:
We’ve developed monitoring scripts for Oracle, PostgreSQL, MySQL, and SQL Server. These scripts alert when long-running transactions stall DMS replication. They detect and alert on long-running transactions (default: 15 minutes). Each script is designed for its specific database engine while following a consistent monitoring framework.
Appropriate database client tools (sqlplus, psql, mysql, or sqlcmd)
An Amazon Simple Notification Service (Amazon SNS) topic for receiving alert notifications
AWS Command Line Interface (AWS CLI) configured with IAM permissions for SNS publish
Proper database access permissions
Network connectivity from the monitoring host to the database endpoint
Common features across all scripts
All four scripts share a consistent design pattern with the following features:
Feature
Description
Interactive Prompts
All connection parameters are collected through interactive prompts at runtime. Credentials are securely retrieved from AWS Secrets Manager
TLS/SSL Encryption
All database connections are encrypted by default: TCPS for Oracle, -N flag for SQL Server, sslmode=require for PostgreSQL, --ssl-mode=REQUIRED for MySQL
AMAZON SNS Alerts
Alerts are published to a configurable AMAZON SNS topic, enabling distribution to multiple subscribers (email, SMS, AWS Lambda, and more)
Prerequisite Checks
Each script validates that required tools (AWS CLI, database client) are installed before proceeding
False Positive Filtering
Internal/system processes and client warnings are filtered out to prevent false alerts
main(): Orchestration with configuration summary and log directory setup.
Script details by engine
Oracle long-running session monitor
This bash script automatically detects Oracle database sessions running longer than the configured threshold and publishes alerts to Amazon SNS. It connects using the TCPS protocol for TLS/SSL encryption, with optional Oracle Wallet support for certificate-based authentication.
Usage:
Interactive prompts:
TLS/SSL configuration: The script uses TCPS protocol by default (port 2484). For Oracle Wallet-based SSL, set the following environment variables before running:
Key filters: Excludes BACKGROUND processes and the RDSADMIN user. Only monitors ACTIVE sessions.
PostgreSQL long-running transaction monitor
This bash script automatically detects PostgreSQL transactions exceeding the configured threshold and publishes alerts to Amazon SNS. It enforces TLS/SSL via the sslmode connection parameter.
Usage:
Interactive prompts:
TLS/SSL configuration: Default sslmode=require. For stricter verification, set environment variables:
False positive prevention: The script separates stderr from stdout to prevent psql client warnings (such as libpq.so version messages) from being treated as transaction data.
MySQL long-running transaction monitor
This bash script automatically detects MySQL transactions running longer than the configured threshold, providing detailed reports and publishing alerts to Amazon SNS. It enforces TLS/SSL via the --ssl-mode parameter.
Usage:
Interactive prompts:
TLS/SSL configuration: Default --ssl-mode=REQUIRED. For stricter verification with the RDS CA bundle:
False positive prevention: The script filters out MySQL internal processes (event_scheduler, rdsadmin, system user, Daemon commands) and strips the mysql: [Warning] Using a password on the command line interface can be insecure warning from output.
SQL Server long-running transaction monitor
This bash script automatically detects SQL Server transactions exceeding the configured threshold and publishes alerts to Amazon SNS. It enforces TLS/SSL via the -N flag with sqlcmd.
Usage:
Interactive prompts:
TLS/SSL configuration: The script uses -N (encrypt) and -C (trust server certificate) by default. For strict certificate verification, install the RDS CA bundle into the system trust store and set:
False positive prevention: Filters to is_user_process = 1 only and strips (N rows affected) noise from sqlcmd output. SQL text is truncated to 200 characters.
Sample SNS alert output
When a long-running transaction is detected, the script publishes a formatted alert to the configured SNS topic. Here is an example alert from the Oracle monitor:
All subscribers to the SNS topic (email, SMS, Lambda, and more) receive this alert, so the operations team can respond quickly.
Sample log output
Scheduling with crontab
For continuous monitoring, configure the scripts as cron jobs. Since the scripts use interactive prompts, you can create a wrapper script that pipes the inputs, or modify the scripts to retrieve credentials from AWS Secrets Manager. Alternatively, for crontab usage, you can set the variables directly in a non-interactive wrapper:
Note: The scripts use bash-specific syntax (such as, [[ =~ ]] for regex matching). Always invoke them with bash script_name.sh rather than sh script_name.sh.
Demonstration
We are going to perform a demo of the script in action by choosing Oracle as our source endpoint and check if the script is indeed able to capture the long-running sessions. For the demo we have used Amazon Relational Database Service (Amazon RDS) for Oracle 19c Enterprise Edition as source:
Create a full load and CDC task to load the EVENTS_LOB table. Table structure:
Schedule the monitoring script in crontab to execute every 15 minutes:
Start the DMS task and have it completed the full load and move on to the CDC phase of the migration task.
Generate high volume of DML in the source with commit and wait for the latency spike to happen:
Observe the DMS task Amazon CloudWatch metrics. You will see an increase in CDCLatencySource as the long-running transaction holds up replication.
Execute the monitoring script. The script detects the long-running session and publishes an alert to the SNS topic with full session details including SID, username, duration, SQL text, and wait events.
SNS subscribers receive the alert. All subscribers to the configured SNS topic (email, SMS, Lambda, and more) receive the formatted alert, so the operations team can investigate and take action. A sample alert is included in the following section for reference:
Security considerations
The monitoring scripts incorporate several security best practices:
No command-line credentials: All connection parameters are collected via interactive prompts, preventing password exposure in ps output, shell history, or process listings.
TLS/SSL encryption: All database connections are encrypted by default across all four engines.
IAM-based alerting: Alerts use Amazon SNS with IAM authentication, so no email credentials are stored in the scripts.
Password: Credentials are collected via silent interactive prompts (read -s), preventing exposure in shell history or process listings. For automated scheduling, the scripts support --secret-id to retrieve credentials directly from AWS Secrets Manager, eliminating plaintext passwords entirely.
SQL ID only: For security, scripts report only SQL_ID/query_id references, not actual SQL text. Use these identifiers to look up queries in database monitoring views if needed.
Temporary file cleanup: All temporary SQL files and stderr capture files are cleaned up after use.
Conclusion
Long-running transactions can increase your CDC source latency from seconds to hours and cause replication delays that grow until the transaction commits. The monitoring scripts provided for Oracle, PostgreSQL, MySQL, and SQL Server offer a proactive solution to identify these problematic transactions before they become critical issues. As demonstrated in our Oracle example, these tools effectively detect and alert administrators about long-running sessions, enabling timely intervention and optimization.
The scripts enforce TLS/SSL encryption on all database connections, use Amazon SNS for scalable alert distribution, and include false-positive filtering to make sure alerts are actionable. By implementing this monitoring suite, you transform from reactive troubleshooting to proactive management. This post helps you identify potential latency issues before they impact database operations or AWS DMS replication, ensuring smooth, efficient database operations across all your platforms.