Controls when commits are written to disk.
|PUBLIC role||For current user||For other users|
|Allowed to set permanently?||Yes, with SET ANY PUBLIC OPTION||Yes||Yes, with SET ANY PUBLIC OPTION|
|Allowed to set temporarily?||Yes, with SET ANY PUBLIC OPTION||Yes (current connection only)||No|
If cooperative_commits is set to Off, a COMMIT is written to disk when the database server receives it, and the application is then allowed to continue.
If cooperative_commits is set to On (the default) and if there are other active connections, the database server does not immediately write the COMMIT to the disk. Instead, the application waits for up to the maximum length set by the cooperative_commit_timeout option for something else to put on the pages before they are written to disk.
Setting cooperative_commits to On, and increasing the cooperative_commit_timeout setting, increases overall database server throughput by cutting down the number of disk I/Os, but at the expense of a longer turnaround time for each individual connection.
If both cooperative_commits and delayed_commits are set to On, and the cooperative_commit_timeout interval passes without the pages getting written, the application is resumed (as if the commit had worked), and the remaining interval (delayed_commit_timeout - cooperative_commit_timeout) is used as a delayed_commits interval. The pages are then written, even if they are not full.