From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Keep track of transaction commit timestamps
Date: Wed, 03 Dec 2014 14:54:22 +0000
Message-ID: <E1XwBJu-0000Oh-PA@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Keep track of transaction commit timestamps
Transactions can now set their commit timestamp directly as they commit,
or an external transaction commit timestamp can be fed from an outside
system using the new function TransactionTreeSetCommitTsData(). This
data is crash-safe, and truncated at Xid freeze point, same as pg_clog.
This module is disabled by default because it causes a performance hit,
but can be enabled in postgresql.conf requiring only a server restart.
A new test in src/test/modules is included.
Catalog version bumped due to the new subdirectory within PGDATA and a
couple of new SQL functions.
Authors: Álvaro Herrera and Petr Jelínek
Reviewed to varying degrees by Michael Paquier, Andres Freund, Robert
Haas, Amit Kapila, Fujii Masao, Jaime Casanova, Simon Riggs, Steven
Singer, Peter Eisentraut
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/73c986adde5d73a5e2555da9b5c8facedb146dcd
Modified Files
--------------
contrib/pg_upgrade/pg_upgrade.c | 7 +
contrib/pg_xlogdump/rmgrdesc.c | 1 +
doc/src/sgml/config.sgml | 14 +
doc/src/sgml/func.sgml | 39 +
doc/src/sgml/ref/pg_resetxlog.sgml | 19 +-
doc/src/sgml/storage.sgml | 5 +
src/backend/access/rmgrdesc/Makefile | 2 +-
src/backend/access/rmgrdesc/committsdesc.c | 82 ++
src/backend/access/rmgrdesc/xlogdesc.c | 3 +
src/backend/access/transam/Makefile | 5 +-
src/backend/access/transam/README | 2 +-
src/backend/access/transam/commit_ts.c | 902 ++++++++++++++++++++
src/backend/access/transam/rmgr.c | 1 +
src/backend/access/transam/slru.c | 2 +-
src/backend/access/transam/varsup.c | 4 +-
src/backend/access/transam/xact.c | 27 +-
src/backend/access/transam/xlog.c | 43 +-
src/backend/commands/vacuum.c | 8 +-
src/backend/libpq/hba.c | 2 +-
src/backend/replication/logical/decode.c | 1 +
src/backend/storage/ipc/ipci.c | 3 +
src/backend/storage/lmgr/lwlock.c | 4 +
src/backend/utils/misc/guc.c | 10 +
src/backend/utils/misc/postgresql.conf.sample | 2 +
src/bin/initdb/initdb.c | 1 +
src/bin/pg_controldata/pg_controldata.c | 4 +
src/bin/pg_resetxlog/pg_resetxlog.c | 75 +-
src/include/access/commit_ts.h | 72 ++
src/include/access/rmgrlist.h | 1 +
src/include/access/transam.h | 6 +
src/include/access/xlog_internal.h | 1 +
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_control.h | 3 +
src/include/catalog/pg_proc.h | 6 +
src/include/storage/lwlock.h | 5 +-
src/include/utils/builtins.h | 4 +
src/test/modules/Makefile | 1 +
src/test/modules/commit_ts/.gitignore | 4 +
src/test/modules/commit_ts/Makefile | 15 +
src/test/modules/commit_ts/commit_ts.conf | 1 +
.../commit_ts/expected/commit_timestamp.out | 39 +
.../commit_ts/expected/commit_timestamp_1.out | 34 +
.../modules/commit_ts/sql/commit_timestamp.sql | 24 +
43 files changed, 1458 insertions(+), 28 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: alvherre@alvh.no-ip.org
Subject: Re: pgsql: Keep track of transaction commit timestamps
In-Reply-To: <E1XwBJu-0000Oh-PA@gemulon.postgresql.org>
References: <E1XwBJu-0000Oh-PA@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