Skip site navigation (1) Skip section navigation (2)

Synchronous commit not... synchronous?

From: Peter van Hardenberg <pvh(at)pvh(dot)ca>
To: "pgsql-hackers(at)postgresql(dot)org Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Synchronous commit not... synchronous?
Date: 2012-11-01 01:39:20
Message-ID: CAAcg=kUEF0f04nCy_aNKA6gGJNbTC1sD-gNnzXQByphjZ0JR2g@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
This was rather surprising - my synchronous commit was... not cancelled. Is
this expected behaviour?

d5r5fdj6u5ieml=> begin;
BEGIN
d5r5fdj6u5ieml=> set synchronous_commit = 'on';
SET
d5r5fdj6u5ieml=> insert into data values ('baz');
INSERT 0 1
d5r5fdj6u5ieml=> commit;
^CCancel request sent
WARNING:  canceling wait for synchronous replication due to user request
DETAIL:  The transaction has already committed locally, but might not have
been replicated to the standby.
COMMIT
d5r5fdj6u5ieml=> select * from data;
 foo
-----
 bar
 baz
(2 rows)

d5r5fdj6u5ieml=> rollback;
NOTICE:  there is no transaction in progress
ROLLBACK
d5r5fdj6u5ieml=>


-- 
Peter van Hardenberg
San Francisco, California
"Everything was beautiful, and nothing hurt." -- Kurt Vonnegut

Responses

pgsql-hackers by date

Next:From: Amit kapilaDate: 2012-11-01 04:00:05
Subject: Re: Proposal for Allow postgresql.conf values to be changed via SQL
Previous:From: Noah MischDate: 2012-11-01 00:46:03
Subject: Re: [PATCH] Support for Array ELEMENT Foreign Keys

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group