Re: BUG #6018: ctrl +C cause data inconsistent for sync standby

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: lxzou <zoulx1982(at)163(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6018: ctrl +C cause data inconsistent for sync standby
Date: 2011-05-10 12:02:49
Message-ID: BANLkTi=8nfOusK0RYuk47kLm1y3tTUohLg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, May 10, 2011 at 11:38 AM, lxzou <zoulx1982(at)163(dot)com> wrote:
>  I am interested in standby function of PG, so i test the new feature about
> 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, the
> 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 disk).

Regards,

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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message etdirloth 2011-05-10 12:29:51 BUG #6019: invalid cached plan on inherited table
Previous Message Noah Misch 2011-05-10 09:31:24 Re: Bug with STABLE function using the wrong snapshot (probably during planning)