Re: BUG #6018: ctrl +C cause data inconsistent for sync standby - Mailing list pgsql-bugs

From Fujii Masao
Subject Re: BUG #6018: ctrl +C cause data inconsistent for sync standby
Date
Msg-id BANLkTi=8nfOusK0RYuk47kLm1y3tTUohLg@mail.gmail.com
Whole thread Raw
In response to BUG #6018: ctrl +C cause data inconsistent for sync standby  ("lxzou" <zoulx1982@163.com>)
List pgsql-bugs
On Tue, May 10, 2011 at 11:38 AM, lxzou <zoulx1982@163.com> wrote:
> =A0I am interested in standby function of PG, so i test the new feature a=
bout
> sync standby in PG9.1. I have a question, i install only one primary
> postgres and no standby server. When i execute an insert statement in
> primary, this statement was blocked. But when I press Ctrl + C in psql, t=
he
> statement was commited. In my view, the walsender can't send the xlog to
> standby server, the statement should be rollback, but not commit; because
> this will cause the data between primary and standby inconsistent.

The transaction gets blocked by sync rep *after* it's committed on the
master. So, we cannot rollback such a transaction because it's already
been committed on the master (i.e., WAL has already been flushed to the dis=
k).

Regards,

--=20
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

pgsql-bugs by date:

Previous
From: Noah Misch
Date:
Subject: Re: Bug with STABLE function using the wrong snapshot (probably during planning)
Next
From: Martin Pitt
Date:
Subject: 9.1beta1 "collate" test failure