pgsql: Properly re-initialize replication slot shared memory upon creat

Поиск
Список
Период
Сортировка
От Andres Freund
Тема pgsql: Properly re-initialize replication slot shared memory upon creat
Дата
Msg-id E1ba7MI-00066o-7W@gemulon.postgresql.org
обсуждение исходный текст
Список 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@chewy.com
Author: Michael Paquier
Discussion: <20160705173502.1398.70934@wrigleys.postgresql.org>
Backpatch: 9.4, where replication slots were introduced

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/690a2fb90ef47a3a0750b70e2abf13bbb82466ff

Modified Files
--------------
src/backend/replication/slot.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix -e option in contrib/intarray/bench/bench.pl.
Следующее
От: Andres Freund
Дата:
Сообщение: pgsql: Properly re-initialize replication slot shared memory upon creat