]> granicus.if.org Git - postgresql/commit
Skip checkpoints, archiving on idle systems.
authorAndres Freund <andres@anarazel.de>
Thu, 22 Dec 2016 19:31:50 +0000 (11:31 -0800)
committerAndres Freund <andres@anarazel.de>
Thu, 22 Dec 2016 19:31:50 +0000 (11:31 -0800)
commit6ef2eba3f57f17960b7cd4958e18aa79e357de2f
tree99eb4b00aee1a41081f9b163923ee711b0567aa2
parent097e41439d69e11fb870e009b1ac64dda4f01c3d
Skip checkpoints, archiving on idle systems.

Some background activity (like checkpoints, archive timeout, standby
snapshots) is not supposed to happen on an idle system. Unfortunately
so far it was not easy to determine when a system is idle, which
defeated some of the attempts to avoid redundant activity on an idle
system.

To make that easier, allow to make individual WAL insertions as not
being "important". By checking whether any important activity happened
since the last time an activity was performed, it now is easy to check
whether some action needs to be repeated.

Use the new facility for checkpoints, archive timeout and standby
snapshots.

The lack of a facility causes some issues in older releases, but in my
opinion the consequences (superflous checkpoints / archived segments)
aren't grave enough to warrant backpatching.

Author: Michael Paquier, editorialized by Andres Freund
Reviewed-By: Andres Freund, David Steele, Amit Kapila, Kyotaro HORIGUCHI
Bug: #13685
Discussion:
    https://www.postgresql.org/message-id/20151016203031.3019.72930@wrigleys.postgresql.org
    https://www.postgresql.org/message-id/CAB7nPqQcPqxEM3S735Bd2RzApNqSNJVietAC=6kfkYv_45dKwA@mail.gmail.com
Backpatch: -
13 files changed:
doc/src/sgml/config.sgml
src/backend/access/heap/heapam.c
src/backend/access/transam/xact.c
src/backend/access/transam/xlog.c
src/backend/access/transam/xlogfuncs.c
src/backend/access/transam/xloginsert.c
src/backend/postmaster/bgwriter.c
src/backend/postmaster/checkpointer.c
src/backend/replication/logical/message.c
src/backend/storage/ipc/standby.c
src/include/access/xlog.h
src/include/access/xlog_internal.h
src/include/access/xloginsert.h