Skip to content

Aurora Postgresql WAL parameters missing

0

Hi there,

I configured an Aurora Postgresql Serverless v2 (16.9) instance with the parameter synchronous_commit = off to improve the transactions performance. I'm trying to configure now the wal_writer_delay to reduce it from the default 200ms, in order to reduce the possible transactions lost after a crash event. But I can't find the parameter on the aurora-postgresql16 parameter group family. I also see other wal level related parameters missing.

According to the Postgresql docs for synchronous_commit, "...In off mode, there is no waiting, so there can be a delay between when success is reported to the client and when the transaction is later guaranteed to be safe against a server crash. (The maximum delay is three times wal_writer_delay.)" That also stands for Aurora Postgresql? What value is really using Aurora Postgresql for wal_writer_delay? It says 200 with SHOW wal_writer_delay, but how we can change it and confirm that is applying for Aurora Postgresql?

Regards,

Pedro

asked a year ago354 views

1 Answer
0

When running PostgreSQL as an Amazon Aurora cluster, you're correct that some parameters are handled differently than in standard PostgreSQL installations.

For Aurora PostgreSQL, many PostgreSQL parameters are configurable through Parameter Groups, but some parameters are disabled or can't be modified because Amazon Aurora manages certain aspects of the database differently due to its architecture. Parameter Groups in Aurora are divided into cluster-level parameters (which apply to the entire cluster) and instance-level parameters (which apply to specific database instances).

Regarding the wal_writer_delay parameter specifically, while you can see its value using the SHOW wal_writer_delay command (which returns 200ms as you noted), this parameter might not be modifiable in Aurora PostgreSQL. Aurora has its own storage and WAL handling mechanisms that differ from standard PostgreSQL.

The Write-Ahead Log (WAL) buffer in Aurora PostgreSQL holds transaction data that will later be written to persistent storage. When a client changes data, Aurora PostgreSQL writes these changes to the WAL buffer, and when a client issues a COMMIT, the WAL writer process writes the transaction data to the WAL file.

For your specific concern about data loss with synchronous_commit = off, the standard PostgreSQL documentation states that the maximum delay for transaction durability would be three times the wal_writer_delay value. However, Aurora's architecture for handling WAL might differ from standard PostgreSQL, so this exact relationship may not apply in the same way.

To confirm which parameters you can modify and their current values, you can run:

SELECT name, setting
FROM pg_settings
WHERE name LIKE '%wal%';

If you need to adjust WAL-related behavior for your specific workload requirements, you might want to consider other configurable parameters like wal_buffers or explore Aurora-specific features that address your performance and durability needs.
Sources
Configuring server options - SQL Server to Aurora PostgreSQL Migration Playbook
Essential concepts for Aurora PostgreSQL tuning - Amazon Aurora
Benchmark Amazon RDS for PostgreSQL with Dedicated Log Volumes | AWS Database Blog

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.