- Le plus récent
- Le plus de votes
- La plupart des commentaires
Hi,
Our blog post discusses this, a link below is provided. [1]
If you disable synchronous_commit, PostgreSQL doesn’t try to ensure durability of every transaction. Instead, PostgreSQL writes committed transactions to the WAL file in groups. This can offer performance benefits at the risk of losing transactions. You should be very careful when changing this parameter from its default value. Disabling synchronous_commit compromises durability of your DB instance and can lead to data loss. Aurora PostgreSQL uses a log-based storage engine to persist all modifications. Every commit is sent to six copies of data; after it’s confirmed by a quorum of four, Aurora PostgreSQL can acknowledge the commit back to client. If you disable synchronous_commit, every commit requested by client doesn’t wait for the four out of six quorum. Ideally, you shouldn’t disable this parameter because that compromises the durability benefits offered by Aurora PostgreSQL.
This is something that is being reviewed with regards to logical replication, but at this time Aurora Postgres greatly depends on synchronous_commit = on
in order to protect the integrity of the data.
References: [1] https://aws.amazon.com/blogs/database/amazon-aurora-postgresql-parameters-part-2-replication-security-and-logging/
Thank you for the explanation. We will discuss and benchmark synchronous_commit = on
.
In PostgreSQL, including RDS PostgreSQL, disabling synchronous_commit
means committing transactions without ensuring durability for every transaction, potentially improving performance but risking data loss. In Aurora PostgreSQL, disabling this parameter doesn't wait for the four out of six quorum confirmations, compromising durability benefits. Aurora PostgreSQL employs a log-based storage engine, confirming commits after a quorum of four copies, ensuring durability.
Disabling the synchronous_commit parameter in Aurora PostgreSQL is not recommended because it compromises the durability benefits provided by Aurora's log-based storage engine. When synchronous_commit is disabled, commits requested by the client won't wait for the required quorum of four out of six copies to confirm, increasing the risk of data loss. Aurora PostgreSQL relies on synchronous commit to ensure the integrity and durability of transactions, making it crucial not to disable this parameter for the safety of your database instance.
References:
[+] https://aws.amazon.com/blogs/database/amazon-aurora-postgresql-parameters-part-2-replication-security-and-logging/
We found that switching synchronous_commit
back on
did not impact our job queue throughput, so all is well. :)
Contenus pertinents
- demandé il y a un an
- demandé il y a 2 mois
- demandé il y a 6 mois
- Réponse acceptéedemandé il y a 2 ans
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a un an