pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: abcxiaod@126.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16498: The master inserts data successfully when the standby stopped in synchronous stream replication
Date: Thu, 18 Jun 2020 11:40:12 -0400
Message-ID: <1550941.1592494812@sss.pgh.pa.us> (raw)
In-Reply-To: <16498-4e2fce82c5d90d9c@postgresql.org>
References: <16498-4e2fce82c5d90d9c@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> [ $subject ]

I don't think this is a bug; you are just misunderstanding the guarantee
that synchronous replication offers.  In syncrep mode, the primary server
commits and then waits for some number of standbys to acknowledge having
replicated that commit action before it tells the client the commit is
complete.  Killing the primary during that wait does not, and cannot,
cause the commit not to have happened.

What I think you are looking for is two-phase commit, which is a whole
different animal that is far more complex and expensive than syncrep.

			regards, tom lane





view thread (2+ messages)

Message-ID: <1550941.1592494812@sss.pgh.pa.us>
Permalink:  ../1550941.1592494812@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1550941.1592494812@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, abcxiaod@126.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #16498: The master inserts data successfully when the standby stopped in synchronous stream replication
  In-Reply-To: <1550941.1592494812@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox