Re: BUG #16498: The master inserts data successfully when the standby stopped in synchronous stream replication

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: abcxiaod(at)126(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16498: The master inserts data successfully when the standby stopped in synchronous stream replication
Date: 2020-06-18 15:40:12
Message-ID: 1550941.1592494812@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephen Frost 2020-06-18 15:41:53 Re: BUG #16497: old and new pg_controldata WAL segment sizes are invalid or do not match
Previous Message Bruce Momjian 2020-06-18 15:29:11 Re: BUG #16497: old and new pg_controldata WAL segment sizes are invalid or do not match