Synchronous commit not... synchronous? - Mailing list pgsql-hackers

From Peter van Hardenberg
Subject Synchronous commit not... synchronous?
Date
Msg-id CAAcg=kUEF0f04nCy_aNKA6gGJNbTC1sD-gNnzXQByphjZ0JR2g@mail.gmail.com
Whole thread Raw
Responses Re: Synchronous commit not... synchronous?  (David Fetter <david@fetter.org>)
Re: Synchronous commit not... synchronous?  (Peter Eisentraut <peter@eisentraut.org>)
List 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

pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: [PATCH] Support for Array ELEMENT Foreign Keys
Next
From: Amit kapila
Date:
Subject: Re: Proposal for Allow postgresql.conf values to be changed via SQL