pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #6018: ctrl +C cause data inconsistent for sync standby
2+ messages / 2 participants
[nested] [flat]

* BUG #6018: ctrl +C cause data inconsistent for sync standby
@ 2011-05-10 02:38  lxzou <zoulx1982@163.com>
  0 siblings, 1 reply; 2+ messages in thread

From: lxzou @ 2011-05-10 02:38 UTC (permalink / raw)
  To: pgsql-bugs


The following bug has been logged online:

Bug reference:      6018
Logged by:          lxzou
Email address:      zoulx1982@163.com
PostgreSQL version: 9.1beta1
Operating system:   Linux
Description:        ctrl +C cause data inconsistent for sync standby
Details: 

Dear Sir:
  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. 
Thank you for your time.
Look forward to your reply.



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #6018: ctrl +C cause data inconsistent for sync standby
@ 2011-05-10 12:02  Fujii Masao <masao.fujii@gmail.com>
  parent: lxzou <zoulx1982@163.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Fujii Masao @ 2011-05-10 12:02 UTC (permalink / raw)
  To: lxzou <zoulx1982@163.com>; +Cc: pgsql-bugs

On Tue, May 10, 2011 at 11:38 AM, lxzou <zoulx1982@163.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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2011-05-10 12:02 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-05-10 02:38 BUG #6018: ctrl +C cause data inconsistent for sync standby lxzou <zoulx1982@163.com>
2011-05-10 12:02 ` Fujii Masao <masao.fujii@gmail.com>

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