Re: Request for further clarification on synchronous_commit

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Kasper Kondzielski <kghost0(at)gmail(dot)com>
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org, jaroslaw(dot)kijanowski(at)softwaremill(dot)com
Subject: Re: Request for further clarification on synchronous_commit
Date: 2020-08-18 17:17:40
Message-ID: 20200818171740.GE27231@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Tue, Aug 18, 2020 at 10:58:51AM -0400, Bruce Momjian wrote:
> Un, 'on' does _not_ apply the WAL data, and remote_apply does do remote
> fsync. If you want to go in order of severity, with the most severe
> first, it is:
>
> remote_apply
> on
> remote_write
> local
>
> This is seen in the C enum ordering for synchronous_commit, but in
> reverse order:
>
> typedef enum
> {
> SYNCHRONOUS_COMMIT_OFF, /* asynchronous commit */
> SYNCHRONOUS_COMMIT_LOCAL_FLUSH, /* wait for local flush only */
> SYNCHRONOUS_COMMIT_REMOTE_WRITE, /* wait for local flush and remote
> * write */
> SYNCHRONOUS_COMMIT_REMOTE_FLUSH, /* wait for local and remote flush */
> SYNCHRONOUS_COMMIT_REMOTE_APPLY /* wait for local flush and remote apply */
> } SyncCommitLevel;

Also, there is some logic to say that the postgresql.conf
synchronous_commit options list should be reordered from:

#synchronous_commit = on # synchronization level;
# off, local, remote_write, remote_apply, or on

to

#synchronous_commit = on # synchronization level;
# off, local, remote_write, on, or remote_apply

I think we should backpatch the doc changes, but maybe not the
postgresql.conf one --- I am not sure.

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EnterpriseDB https://enterprisedb.com

The usefulness of a cup is in its emptiness, Bruce Lee

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Kasper Kondzielski 2020-08-19 09:39:53 Re: Request for further clarification on synchronous_commit
Previous Message David G. Johnston 2020-08-18 17:08:09 Re: need for "see also" section or similar thing at hub pages