Skip to main content

Aurora PostgreSQL Logging: AWS's 16,202 to 5,039 TPS Lab

Cloud ArchitecturePalaniappan P6 min read

Quick summary: On 19 November 2026 AWS measured Aurora PostgreSQL 17 on a db.r6i.4xlarge. At 800 clients, minimal logging did 16,202 TPS. The same run with pgaudit.log=ALL did 5,039 TPS. At 8 clients the three configs were within noise.

Key Takeaways

  • On 19 November 2026 AWS measured Aurora PostgreSQL 17 on a db
  • r6i
  • 4xlarge
  • At 800 clients, minimal logging did 16,202 TPS
  • log=ALL did 5,039 TPS
Typographic data card of AWS's Aurora PostgreSQL logging lab. At 800 clients, pgaudit.log ALL fell from 16,202 TPS to 5,039 TPS. Not a FactualMinds benchmark.
Table of Contents

On 19 November 2026, AWS published a lab on excessive logging in Amazon Aurora PostgreSQL. The instance was Aurora PostgreSQL 17, db.r6i.4xlarge. These throughput numbers are theirs. We did not rerun them, and they are not a sizing factor for your cluster.

Why a small test lies

At 8 clients each backend can write its log line. The logging collector is not saturated. AWS’s three results sit within about one percent. A change window that “validates” log_statement = all with a handful of sessions will ship it.

Their function did what a lot of API functions do: a few config lookups, a nested call, a JSON response, and three inserts, about 15 statements once the nested work is counted. pgaudit.log = ALL logs statements inside the function body, not only the statement the client sent. About 12 of those 15 were SELECT. That is why the audit log, not the table size, dominated.

Two-column diagram of AWS's Aurora PostgreSQL wait profile at 800 clients, minimal logging versus pgaudit.log ALL

Figure: the wait-event flip in AWS’s 19 November 2026 lab on Aurora PostgreSQL 17, db.r6i.4xlarge, 800 clients. Not a FactualMinds measurement. Open the draw.io source.

The shape they describe under pgaudit.log = ALL is not a slower version of the healthy line. Throughput sat near 3,600–3,700 TPS for most of the run, with latency around 218 ms on that plateau, against a 49 ms average on minimal logging. One interval jumped back toward 6,900 TPS. They treat that jump as the exception.

CloudWatch Database Insights is how they showed it. You do not need that graph to suspect it. pg_stat_activity with a null wait_event means the backend is on CPU, not waiting on a lock, a buffer, or a commit. If almost every active session looks like that while TPS is down and the log files are huge, the work is in writing the log, which PostgreSQL’s wait events do not name.

What to change, and what not to

Read the live settings before you touch the parameter group. The query is logging-settings-check.sql.

-- Aurora PostgreSQL or RDS for PostgreSQL. Read-only. No reboot.
SELECT name, setting
FROM pg_settings
WHERE name IN (
  'log_statement',
  'log_min_duration_statement',
  'log_error_verbosity',
  'pgaudit.log',
  'pgaudit.log_statement'
);

If log_statement is all and pgaudit.log is anything but none, the cost scales with nested statements per call and with concurrency, not with table size.

We recommend you do not leave pgaudit.log = ALL on a busy writer because a development check looked free. The trade-off is an audit record that no longer includes every nested SELECT. AWS’s post says many compliance needs are met with write, ddl, and role, and that pgaudit.log_statement = off keeps who ran which class of statement, against which object, and when, while dropping the SQL text that drove the volume. They also say to confirm that reduction on your own workload. We have not, so do not treat “substantially reduce” as a measured promise.

ALTER ROLE ... SET pgaudit.log limits the classes to the roles that need them. Object-level auditing with pgaudit.role is the narrower alternative they name. Turning the extension off entirely is the wrong first move when the requirement is real.

Parameter changes go through the cluster parameter group. ApplyMethod=immediate is valid for the dynamic four. Putting pgaudit into shared_preload_libraries for the first time is pending-reboot, and the writer restarts. Schedule that. After the reboot, flipping pgaudit.log does not restart again.

If you export logs to CloudWatch Logs, that is a second write on top of the local file. Their post names the export as additional work. It does not publish a CloudWatch ingest price for this lab. Do not invent one from the 537 MB file.

-- Read-only. Repeat on a timer during the slow window. Do not run this as a load test.
SELECT coalesce(wait_event_type, '-'), coalesce(wait_event, '-'), count(*)
FROM pg_stat_activity
WHERE backend_type = 'client backend'
  AND state <> 'idle'
  AND pid <> pg_backend_pid()
GROUP BY 1, 2
ORDER BY 3 DESC;

List the log files with aws rds describe-db-log-files for the same window. A second file with a _0 suffix, near or over the rotation size, during a throughput dip, is the physical evidence they used. Compare that with a lock or pool symptom on the deadlock and pool note before you change the instance class. Instance hours are priced on the Aurora pricing note. A larger instance that is busy writing logs is a more expensive log writer.

What to do this week

  1. Run the settings query on the writer. Write down log_statement, log_min_duration_statement, log_error_verbosity, and pgaudit.log.
  2. If pgaudit.log is ALL and the writer is near capacity, sample pg_stat_activity once during the busy hour. A wall of null wait events plus large log files implicates logging.
  3. On a clone, move from ALL to the classes an auditor will sign, and set pgaudit.log_statement = off only after you have compared log volume yourself.
  4. Do not reboot for a dynamic parameter. Reboot only if pgaudit is not yet in shared_preload_libraries.
  5. If the wait events are locks or client reads, leave this page. The next note is pools and deadlocks, not another logging change.

Cluster parameter groups and the reboot window are part of Amazon RDS consulting.

What this post doesn’t cover

  • A rerun. Every TPS, latency, and megabyte figure above is from AWS’s lab on one instance class and one function.
  • Aurora MySQL, or RDS for PostgreSQL as a separate measured result. The post says the same logging work exists on RDS for PostgreSQL. The numbers are the Aurora run.
  • How much CloudWatch Logs ingest would have cost for the 537 MB file.
  • Autovacuum, indexes, or pool sizing. Those are real, and they are not what this lab isolated.
  • The DevOps Agent database skill. That note is an incident procedure. This one is a logging configuration. Do not mix the 73 percent MTTR figure into a logging change.

Sources

Frequently asked questions

Are the 16,202 and 5,039 TPS figures a FactualMinds benchmark?
No. They are whole-run averages from the AWS Database Blog on 19 November 2026, on Aurora PostgreSQL 17, a db.r6i.4xlarge, at 800 clients. We did not rerun the lab. Do not put them in a capacity plan as your throughput.
When should we not turn pgaudit.log off?
When an auditor requires a statement class you would drop. Narrow the class list first, for example write, ddl, and role, and try pgaudit.log_statement=off so the SQL text is dropped while the who, what, and when remain. Confirm the volume drop on your workload. The AWS post says to confirm it. We have not.
What could go wrong if we only test logging with a few connections?
You will not see the cost. At 8 clients, AWS's three configs sat between about 2,549 and 2,612 TPS. The collapse showed up at 800 clients. A laptop check will tell you logging is free.
Does the first pgaudit change reboot the instance?
Adding pgaudit to shared_preload_libraries is static. The first add needs a reboot. After it is loaded, pgaudit.log, log_statement, log_min_duration_statement, and log_error_verbosity are dynamic and apply without a reboot.
If logging is not the bottleneck, where do we look next?
Lock waits, pool exhaustion, and prepared-statement churn are a different failure. That page is the deadlock and pool note. This page only rules logging in or out.
Palaniappan P
Palaniappan P

AWS Cloud Architect & AI Expert

AWS-certified cloud architect and AI expert with deep expertise in cloud migrations, cost optimization, and generative AI on AWS.

AWS ArchitectureCloud MigrationGenAI on AWSCost OptimizationDevOps

Recommended Reading

Explore All Articles »
5 min

Amazon Aurora Pricing: The I/O-Optimized Crossover and the Serverless v2 ACU Trap

Aurora bills instance hours plus storage plus I/O, or storage at a 125% premium with I/O bundled (I/O-Optimized). Serverless v2 at $0.12 per ACU-hour wins on variable workloads, loses on steady traffic above roughly 2 ACU average. Global Database doubles the price per secondary region plus replicated-write fees. Backtrack adds per-change-record cost most teams never factor in.

Kevin W.