※追記(タイトルにRDSと書いたがPostgreSQL限定である) RDSはデフォルトでパラメータをチューニングされているものの、本番でそれなりに使うにはチューニングが必要。 そこで最初にある程度チューニングしておくべき場所を記載していく。 AWSのパラメータについては下記を参考。 docs.aws.amazon.com デッドロックの検査間隔 soudai.hatenablog.com deadlock_timeout はデフォルトは1000msになっている。 1秒はPostgreSQLのデフォルトなので短い。 10秒以上と書いているが弊社の場合は40秒にしている。 これは明確な基準値を持って決めてるわけでは無く、pg_stat_database.deadlocks の値が今までずっと0なので強気に付けている。 checkpointの値 Google検索すると checkpoint_se