pgsql: Replace walsender's latch with the general shared latch.

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Replace walsender's latch with the general shared latch.
Date: 2015-01-17 12:03:32
Message-ID: E1YCS6G-0006xu-MP@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Replace walsender's latch with the general shared latch.

Relying on the normal shared latch simplifies interrupt/signal
handling because we can rely on all signal handlers setting the proc
latch. That in turn allows us to avoid the use of
ImmediateInterruptOK, which arguably isn't correct because
WaitLatchOrSocket isn't declared to be immediately interruptible.

Also change sections that wait on the walsender's latch to notice
interrupts quicker/more reliably and make them more consistent with
each other.

This is part of a larger "get rid of ImmediateInterruptOK" series.

Discussion: 20150115020335(dot)GZ5245(at)awork2(dot)anarazel(dot)de

Branch
------
master

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

Modified Files
--------------
src/backend/replication/basebackup.c | 10 +++-
src/backend/replication/walsender.c | 86 ++++++++++++++-------------
src/include/replication/walsender_private.h | 6 +-
3 files changed, 55 insertions(+), 47 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2015-01-17 16:21:42 Re: pgsql: Remove USE_VPATH make variable from PGXS
Previous Message Tom Lane 2015-01-16 23:19:13 pgsql: Show sort ordering options in EXPLAIN output.