From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Properly re-initialize replication slot shared memory upon creat |
Date: | 2016-08-17 20:22:41 |
Message-ID: | E1ba7MH-00066Q-3T@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Properly re-initialize replication slot shared memory upon creation.
Slot creation did not clear all fields upon creation. After start the
memory is zeroed, but when a physical replication slot was created in
the shared memory of a previously existing logical slot, catalog_xmin
would not be cleared. That in turn would prevent vacuum from doing its
duties.
To fix initialize all the fields. To make similar future bugs less
likely, zero all of ReplicationSlotPersistentData, and re-order the
rest of the initialization to be in struct member order.
Analysis: Andrew Gierth
Reported-By: md(at)chewy(dot)com
Author: Michael Paquier
Discussion: <20160705173502(dot)1398(dot)70934(at)wrigleys(dot)postgresql(dot)org>
Backpatch: 9.4, where replication slots were introduced
Branch
------
REL9_5_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/de396a1cb34626619ddc6fb9dec6d12abee8b589
Modified Files
--------------
src/backend/replication/slot.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2016-08-17 20:22:42 | pgsql: Properly re-initialize replication slot shared memory upon creat |
Previous Message | Andres Freund | 2016-08-17 20:22:40 | pgsql: Properly re-initialize replication slot shared memory upon creat |