Request for further clarification on synchronous_commit

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: kghost0(at)gmail(dot)com
Subject: Request for further clarification on synchronous_commit
Date: 2020-08-14 13:32:35
Message-ID: 159741195522.14321.13812604195366728976@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/12/runtime-config-wal.html
Description:

Hello,

First of all I would like to say that PostgreSQL has the best documentation
I've ever seen. It is very clear and comprehensive. That's the main reason
why I decided to add my little 2 cents and make it even better.

I think that the distinction between first three values of
synchronous_commit parameter is not clear enough
(https://www.postgresql.org/docs/12/runtime-config-wal.html#RUNTIME-CONFIG-WAL-SETTINGS).

" When set to on, commits will wait until replies from the current
synchronous standby(s) indicate they have received the commit record of the
transaction and flushed it to disk. This ensures the transaction will not be
lost unless both the primary and all synchronous standbys suffer corruption
of their database storage. When set to remote_apply, commits will wait until
replies from the current synchronous standby(s) indicate they have received
the commit record of the transaction and applied it, so that it has become
visible to queries on the standby(s). When set to remote_write, commits will
wait until replies from the current synchronous standby(s) indicate they
have received the commit record of the transaction and written it out to
their operating system. This setting is sufficient to ensure data
preservation even if a standby instance of PostgreSQL were to crash, but not
if the standby suffers an operating-system-level crash, since the data has
not necessarily reached stable storage on the standby"

The last sentence : "This setting is sufficient to ensure data preservation
even if a standby instance..." seems to refer only to the remote_write
option while in my option it should refer to both remote_write and
remote_apply options, as the fsync is performed only when synchronous_commit
is set to ON.

In other words I think that the documentation should be more clear in terms
of which option uses fsync.

Best regards,
Kasper Kondzielski

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2020-08-15 12:23:08 PostgreSQL 12: Cryptic documentation
Previous Message Pavel Borisov 2020-08-14 13:29:53 Re: Gin Implementation Page