pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix commit timestamp initialization 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix commit timestamp initialization @ 2015-12-11 17:31 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 2+ messages in thread From: Alvaro Herrera @ 2015-12-11 17:31 UTC (permalink / raw) To: pgsql-committers Fix commit timestamp initialization This module needs explicit initialization in order to replay WAL records in recovery, but we had broken this recently following changes to make other (stranger) scenarios work correctly. To fix, rework the initialization sequence so that it always takes place before WAL replay commences for both master and standby. I could have gone for a more localized fix that just added a "startup" call for the master server, but it seemed better to restructure the existing callers as well so that the whole thing made more sense. As a drawback, there is more control logic in xlog.c now than previously, but doing otherwise meant passing down the ControlFile flag, which seemed uglier as a whole. This also meant adding a check to not re-execute ActivateCommitTs if it had already been called. Reported by Fujii Masao. Backpatch to 9.5. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/69e7235c93e2965cc0e17186bd044e4c54997c19 Modified Files -------------- src/backend/access/transam/commit_ts.c | 39 ++++++++++++++++++++++---------- src/backend/access/transam/xlog.c | 22 ++++++++++-------- src/include/access/commit_ts.h | 2 +- 3 files changed, 40 insertions(+), 23 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] 2+ messages in thread
* pgsql: Fix commit timestamp initialization @ 2015-12-11 17:31 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 2+ messages in thread From: Alvaro Herrera @ 2015-12-11 17:31 UTC (permalink / raw) To: pgsql-committers Fix commit timestamp initialization This module needs explicit initialization in order to replay WAL records in recovery, but we had broken this recently following changes to make other (stranger) scenarios work correctly. To fix, rework the initialization sequence so that it always takes place before WAL replay commences for both master and standby. I could have gone for a more localized fix that just added a "startup" call for the master server, but it seemed better to restructure the existing callers as well so that the whole thing made more sense. As a drawback, there is more control logic in xlog.c now than previously, but doing otherwise meant passing down the ControlFile flag, which seemed uglier as a whole. This also meant adding a check to not re-execute ActivateCommitTs if it had already been called. Reported by Fujii Masao. Backpatch to 9.5. Branch ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/0f2c089d3423bcf2bb11d1e5d2d38638cc31fec4 Modified Files -------------- src/backend/access/transam/commit_ts.c | 39 ++++++++++++++++++++++---------- src/backend/access/transam/xlog.c | 22 ++++++++++-------- src/include/access/commit_ts.h | 2 +- 3 files changed, 40 insertions(+), 23 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] 2+ messages in thread
end of thread, other threads:[~2015-12-11 17:31 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2015-12-11 17:31 pgsql: Fix commit timestamp initialization Alvaro Herrera <alvherre@alvh.no-ip.org> 2015-12-11 17:31 pgsql: Fix commit timestamp initialization Alvaro Herrera <alvherre@alvh.no-ip.org>
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