pgsql: Don't wait for the commit record to be replicated if we wrote no

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Don't wait for the commit record to be replicated if we wrote no
Date: 2012-04-17 13:34:42
Message-ID: E1SK8YM-00040R-7g@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Don't wait for the commit record to be replicated if we wrote no WAL.

When using synchronous replication, we waited for the commit record to be
replicated, but if we our transaction didn't write any other WAL records,
that's not required because we don't even flush the WAL locally to disk in
that case. This lead to long waits when committing a transaction that only
modified a temporary table. Bug spotted by Thom Brown.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/fe546f3da6a5ff1d879f587728f74ec457f0ee5f

Modified Files
--------------
src/backend/access/transam/xact.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2012-04-17 13:37:14 pgsql: Don't wait for the commit record to be replicated if we wrote no
Previous Message Thom Brown 2012-04-17 12:52:00 Re: [COMMITTERS] pgsql: Add new replication mode synchronous_commit = 'write'.