pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Properly re-initialize replication slot shared memory upon creat 4+ messages / 1 participants [nested] [flat]
* pgsql: Properly re-initialize replication slot shared memory upon creat @ 2016-08-17 20:22 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 4+ messages in thread From: Andres Freund @ 2016-08-17 20:22 UTC (permalink / raw) To: 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 ------ master Details ------- http://git.postgresql.org/pg/commitdiff/2d7e591007a6f44e5e27e2b6c1098483105c0d10 Modified Files -------------- src/backend/replication/slot.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Properly re-initialize replication slot shared memory upon creat @ 2016-08-17 20:22 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 4+ messages in thread From: Andres Freund @ 2016-08-17 20:22 UTC (permalink / raw) To: 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_6_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/8cb23dba8d75d9be8f1cc58bdfcbcd8e410be39a Modified Files -------------- src/backend/replication/slot.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Properly re-initialize replication slot shared memory upon creat @ 2016-08-17 20:22 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 4+ messages in thread From: Andres Freund @ 2016-08-17 20:22 UTC (permalink / raw) To: 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_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(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Properly re-initialize replication slot shared memory upon creat @ 2016-08-17 20:22 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 4+ messages in thread From: Andres Freund @ 2016-08-17 20:22 UTC (permalink / raw) To: 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(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2016-08-17 20:22 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2016-08-17 20:22 pgsql: Properly re-initialize replication slot shared memory upon creat Andres Freund <andres@anarazel.de> 2016-08-17 20:22 pgsql: Properly re-initialize replication slot shared memory upon creat Andres Freund <andres@anarazel.de> 2016-08-17 20:22 pgsql: Properly re-initialize replication slot shared memory upon creat Andres Freund <andres@anarazel.de> 2016-08-17 20:22 pgsql: Properly re-initialize replication slot shared memory upon creat Andres Freund <andres@anarazel.de>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox