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

pgsql: Fix bug where walsender goes into a busy loop if connection ist

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix bug where walsender goes into a busy loop if connection ist
Date: 2012-03-21 15:48:58
Message-ID: E1SANmU-0008Vd-45@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Fix bug where walsender goes into a busy loop if connection is terminated.

The problem was that ResetLatch was not being called in the walsender loop
if the connection was terminated, so WaitLatch never sleeps until the
terminated connection is detected. In the master-branch, this was already
fixed as a side-effect of some refactoring of the loop. This commit
backports that refactoring to 9.1. 9.0 does not have this bug, because we
didn't use latches back then.

Fujii Masao

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/04e9dc6e01dd8acb1b477c1649172dfbda822581

Modified Files
--------------
src/backend/replication/walsender.c |  110 +++++++++++++++++++----------------
1 files changed, 60 insertions(+), 50 deletions(-)

pgsql-committers by date

Next:From: Robert HaasDate: 2012-03-21 16:40:25
Subject: pgsql: Don't allow CREATE TABLE AS to put relations in pg_global.
Previous:From: Robert HaasDate: 2012-03-21 14:58:07
Subject: pgsql: Improve connectMaintenanceDatabase() error reporting.

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