pgsql: Fix race condition when changing synchronous_standby_names

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix race condition when changing synchronous_standby_names
Date: 2017-12-29 14:44:31
Message-ID: E1eUvtf-00038H-6b@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix race condition when changing synchronous_standby_names

A momentary window exists when synchronous_standby_names
changes that allows commands issued after the change to
continue to act as async until the change becomes visible.
Remove the race by using more appropriate test in syncrep.c

Author: Asim Rama Praveen and Ashwin Agrawal
Reported-by: Xin Zhang, Ashwin Agrawal, and Asim Rama Praveen
Reviewed-by: Michael Paquier, Masahiko Sawada

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/48c9f4926562278a2fd2b85e7486c6d11705f177

Modified Files
--------------
src/backend/replication/syncrep.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Magnus Hagander 2017-12-29 15:28:51 pgsql: Properly set base backup backends to active in pg_stat_activity
Previous Message Simon Riggs 2017-12-29 14:07:06 pgsql: Extend near-wraparound hints to include replication slots