pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix commit_ts for standby
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix commit_ts for standby
@ 2015-10-01 18:08  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Alvaro Herrera @ 2015-10-01 18:08 UTC (permalink / raw)
  To: pgsql-committers

Fix commit_ts for standby

Module initialization was still not completely correct after commit
6b61955135e9, per crash report from Takashi Ohnishi.  To fix, instead of
trying to monkey around with the value of the GUC setting directly, add
a separate boolean flag that enables the feature on a standby, but only
for the startup (recovery) process, when it sees that its master server
has the feature enabled.
Discussion: http://www.postgresql.org/message-id/ca44c6c7f9314868bdc521aea4f77cbf@MP-MSGSS-MBX004.msg.nttdata.co...

Also change the deactivation routine to delete all segment files rather
than leaving the last one around.  (This doesn't need separate
WAL-logging, because on recovery we execute the same deactivation
routine anyway.)

In passing, clean up the code structure somewhat, particularly so that
xlog.c doesn't know so much about when to activate/deactivate the
feature.

Thanks to Fujii Masao for testing and Petr Jelínek for off-list discussion.

Back-patch to 9.5, where commit_ts was introduced.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/a742ef86c228d8a0e9d174c651cfc4f96ac77e61

Modified Files
--------------
src/backend/access/transam/commit_ts.c |  107 ++++++++++++++++++++++----------
src/backend/access/transam/twophase.c  |    2 +-
src/backend/access/transam/xact.c      |    6 +-
src/backend/access/transam/xlog.c      |   26 ++------
src/include/access/commit_ts.h         |    8 +--
5 files changed, 84 insertions(+), 65 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_ts for standby
@ 2015-10-01 18:08  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Alvaro Herrera @ 2015-10-01 18:08 UTC (permalink / raw)
  To: pgsql-committers

Fix commit_ts for standby

Module initialization was still not completely correct after commit
6b61955135e9, per crash report from Takashi Ohnishi.  To fix, instead of
trying to monkey around with the value of the GUC setting directly, add
a separate boolean flag that enables the feature on a standby, but only
for the startup (recovery) process, when it sees that its master server
has the feature enabled.
Discussion: http://www.postgresql.org/message-id/ca44c6c7f9314868bdc521aea4f77cbf@MP-MSGSS-MBX004.msg.nttdata.co...

Also change the deactivation routine to delete all segment files rather
than leaving the last one around.  (This doesn't need separate
WAL-logging, because on recovery we execute the same deactivation
routine anyway.)

In passing, clean up the code structure somewhat, particularly so that
xlog.c doesn't know so much about when to activate/deactivate the
feature.

Thanks to Fujii Masao for testing and Petr Jelínek for off-list discussion.

Back-patch to 9.5, where commit_ts was introduced.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/f12e814b88d8082804bbc8b827469d8068e7252c

Modified Files
--------------
src/backend/access/transam/commit_ts.c |  107 ++++++++++++++++++++++----------
src/backend/access/transam/twophase.c  |    2 +-
src/backend/access/transam/xact.c      |    6 +-
src/backend/access/transam/xlog.c      |   26 ++------
src/include/access/commit_ts.h         |    8 +--
5 files changed, 84 insertions(+), 65 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-10-01 18:08 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-10-01 18:08 pgsql: Fix commit_ts for standby Alvaro Herrera <alvherre@alvh.no-ip.org>
2015-10-01 18:08 pgsql: Fix commit_ts for standby 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