From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@postgresql.org
Subject: pgsql: Skip checkpoints, archiving on idle systems.
Date: Thu, 22 Dec 2016 19:33:30 +0000
Message-ID: <E1cK97K-0003Lh-E7@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
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.orghttps://www.postgresql.org/message-id/CAB7nPqQcPqxEM3S735Bd2RzApNqSNJVietAC=6kfkYv_45dKwA@mail.gmail...
Backpatch: -
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/6ef2eba3f57f17960b7cd4958e18aa79e357de2f
Modified Files
--------------
doc/src/sgml/config.sgml | 10 +--
src/backend/access/heap/heapam.c | 10 +--
src/backend/access/transam/xact.c | 2 +-
src/backend/access/transam/xlog.c | 118 +++++++++++++++++++++++-------
src/backend/access/transam/xlogfuncs.c | 2 +-
src/backend/access/transam/xloginsert.c | 24 ++++--
src/backend/postmaster/bgwriter.c | 8 +-
src/backend/postmaster/checkpointer.c | 45 ++++++++----
src/backend/replication/logical/message.c | 2 +-
src/backend/storage/ipc/standby.c | 11 ++-
src/include/access/xlog.h | 12 ++-
src/include/access/xlog_internal.h | 4 +-
src/include/access/xloginsert.h | 2 +-
13 files changed, 173 insertions(+), 77 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: andres@anarazel.de
Subject: Re: pgsql: Skip checkpoints, archiving on idle systems.
In-Reply-To: <E1cK97K-0003Lh-E7@gemulon.postgresql.org>
References: <E1cK97K-0003Lh-E7@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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