Re: BUG #16498: The master inserts data successfully when the standby stopped in synchronous stream replication - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #16498: The master inserts data successfully when the standby stopped in synchronous stream replication
Date
Msg-id 1550941.1592494812@sss.pgh.pa.us
Whole thread Raw
In response to BUG #16498: The master inserts data successfully when the standby stopped in synchronous stream replication  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
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



pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: BUG #16497: old and new pg_controldata WAL segment sizes areinvalid or do not match
Next
From: Stephen Frost
Date:
Subject: Re: BUG #16497: old and new pg_controldata WAL segment sizes areinvalid or do not match