oldest/newestCommitTs output by pg_controldata
In looking at the exposing pg_controldata as function patch again, it
struck me that the following output seems wrong:
--------------
Latest checkpoint's oldestCommitTs: 20257
Latest checkpoint's newestCommitTs: 84159
--------------
Those numbers are XIDs, not timestamps. Shouldn't we either emit the
actual timestamps, or else rename those to oldest/newestCommitXID?
Joe
--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development
On Sun, Dec 27, 2015 at 10:08 AM, Joe Conway <mail@joeconway.com> wrote:
In looking at the exposing pg_controldata as function patch again, it
struck me that the following output seems wrong:--------------
Latest checkpoint's oldestCommitTs: 20257
Latest checkpoint's newestCommitTs: 84159
--------------Those numbers are XIDs, not timestamps. Shouldn't we either emit the
actual timestamps, or else rename those to oldest/newestCommitXID?
I recall from the commit_ts thread that Alvaro had some real need to
make those fields XIDs and not timestamps, so +1 for renaming that as
suggested.
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 12/26/2015 06:32 PM, Michael Paquier wrote:
On Sun, Dec 27, 2015 at 10:08 AM, Joe Conway <mail@joeconway.com> wrote:
In looking at the exposing pg_controldata as function patch again, it
struck me that the following output seems wrong:--------------
Latest checkpoint's oldestCommitTs: 20257
Latest checkpoint's newestCommitTs: 84159
--------------Those numbers are XIDs, not timestamps. Shouldn't we either emit the
actual timestamps, or else rename those to oldest/newestCommitXID?I recall from the commit_ts thread that Alvaro had some real need to
make those fields XIDs and not timestamps, so +1 for renaming that as
suggested.
Ok, but now next question -- should we just change the user visible
output to oldestCommitXID/newestCommitXID, or should we change the
variable name everywhere it appears in source as well? Looks like each
one appears about 25-30 times scattered across 9 or 10 files. Since they
are new in 9.5, if we're going to change them, I'd think we ought to do
it now or never.
If there is consensus to make the change either way (output-only or
globally), I'll come up with a patch ASAP.
Opinions?
Joe
--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development
Joe Conway <mail@joeconway.com> writes:
Ok, but now next question -- should we just change the user visible
output to oldestCommitXID/newestCommitXID, or should we change the
variable name everywhere it appears in source as well? Looks like each
one appears about 25-30 times scattered across 9 or 10 files. Since they
are new in 9.5, if we're going to change them, I'd think we ought to do
it now or never.
The name is just as misleading at the source-code level, maybe more so
since they're all just numbers in C. +1 for changing it everywhere
before somebody makes a mistake based on the incorrect names.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 12/28/2015 09:03 AM, Tom Lane wrote:
Joe Conway <mail@joeconway.com> writes:
Ok, but now next question -- should we just change the user visible
output to oldestCommitXID/newestCommitXID, or should we change the
variable name everywhere it appears in source as well? Looks like each
one appears about 25-30 times scattered across 9 or 10 files. Since they
are new in 9.5, if we're going to change them, I'd think we ought to do
it now or never.The name is just as misleading at the source-code level, maybe more so
since they're all just numbers in C. +1 for changing it everywhere
before somebody makes a mistake based on the incorrect names.
Ok, I'm on it now
Joe
--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development
Joe Conway wrote:
On 12/28/2015 09:03 AM, Tom Lane wrote:
Joe Conway <mail@joeconway.com> writes:
Ok, but now next question -- should we just change the user visible
output to oldestCommitXID/newestCommitXID, or should we change the
variable name everywhere it appears in source as well? Looks like each
one appears about 25-30 times scattered across 9 or 10 files. Since they
are new in 9.5, if we're going to change them, I'd think we ought to do
it now or never.The name is just as misleading at the source-code level, maybe more so
since they're all just numbers in C. +1 for changing it everywhere
before somebody makes a mistake based on the incorrect names.Ok, I'm on it now
Great, thanks.
--
�lvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 12/28/2015 09:53 AM, Alvaro Herrera wrote:
The name is just as misleading at the source-code level, maybe more so
since they're all just numbers in C. +1 for changing it everywhere
before somebody makes a mistake based on the incorrect names.Ok, I'm on it now
Great, thanks.
I think the attached does the job. Note I settled on
(new|old)estCommitTsXid as that seemed most descriptive and not horribly
longer than before. It did mean, however, that I needed to add a single
space to all the output in pg_resetxlog and pg_controldata, which added
a fair amount to the patch size.
It is all fairly straightforward, but given the impending 9.5 release,
it'd be nice if someone has a chance to give this a quick review before
I commit.
Joe
--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development
Attachments:
committsxid.00.difftext/x-diff; name=committsxid.00.diffDownload
diff --git a/src/backend/access/rmgrdesc/xlogdesc.c b/src/backend/access/rmgrdesc/xlogdesc.c
index 83cc9e8..5e210b9 100644
*** a/src/backend/access/rmgrdesc/xlogdesc.c
--- b/src/backend/access/rmgrdesc/xlogdesc.c
*************** xlog_desc(StringInfo buf, XLogReaderStat
*** 59,66 ****
checkpoint->oldestXidDB,
checkpoint->oldestMulti,
checkpoint->oldestMultiDB,
! checkpoint->oldestCommitTs,
! checkpoint->newestCommitTs,
checkpoint->oldestActiveXid,
(info == XLOG_CHECKPOINT_SHUTDOWN) ? "shutdown" : "online");
}
--- 59,66 ----
checkpoint->oldestXidDB,
checkpoint->oldestMulti,
checkpoint->oldestMultiDB,
! checkpoint->oldestCommitTsXid,
! checkpoint->newestCommitTsXid,
checkpoint->oldestActiveXid,
(info == XLOG_CHECKPOINT_SHUTDOWN) ? "shutdown" : "online");
}
diff --git a/src/backend/access/transam/commit_ts.c b/src/backend/access/transam/commit_ts.c
index 8f09dc8..9b106db 100644
*** a/src/backend/access/transam/commit_ts.c
--- b/src/backend/access/transam/commit_ts.c
*************** TransactionTreeSetCommitTsData(Transacti
*** 217,224 ****
commitTsShared->dataLastCommit.nodeid = nodeid;
/* and move forwards our endpoint, if needed */
! if (TransactionIdPrecedes(ShmemVariableCache->newestCommitTs, newestXact))
! ShmemVariableCache->newestCommitTs = newestXact;
LWLockRelease(CommitTsLock);
}
--- 217,224 ----
commitTsShared->dataLastCommit.nodeid = nodeid;
/* and move forwards our endpoint, if needed */
! if (TransactionIdPrecedes(ShmemVariableCache->newestCommitTsXid, newestXact))
! ShmemVariableCache->newestCommitTsXid = newestXact;
LWLockRelease(CommitTsLock);
}
*************** TransactionIdGetCommitTsData(Transaction
*** 285,292 ****
int entryno = TransactionIdToCTsEntry(xid);
int slotno;
CommitTimestampEntry entry;
! TransactionId oldestCommitTs;
! TransactionId newestCommitTs;
/* error if the given Xid doesn't normally commit */
if (!TransactionIdIsNormal(xid))
--- 285,292 ----
int entryno = TransactionIdToCTsEntry(xid);
int slotno;
CommitTimestampEntry entry;
! TransactionId oldestCommitTsXid;
! TransactionId newestCommitTsXid;
/* error if the given Xid doesn't normally commit */
if (!TransactionIdIsNormal(xid))
*************** TransactionIdGetCommitTsData(Transaction
*** 314,331 ****
return *ts != 0;
}
! oldestCommitTs = ShmemVariableCache->oldestCommitTs;
! newestCommitTs = ShmemVariableCache->newestCommitTs;
/* neither is invalid, or both are */
! Assert(TransactionIdIsValid(oldestCommitTs) == TransactionIdIsValid(newestCommitTs));
LWLockRelease(CommitTsLock);
/*
* Return empty if the requested value is outside our valid range.
*/
! if (!TransactionIdIsValid(oldestCommitTs) ||
! TransactionIdPrecedes(xid, oldestCommitTs) ||
! TransactionIdPrecedes(newestCommitTs, xid))
{
*ts = 0;
if (nodeid)
--- 314,331 ----
return *ts != 0;
}
! oldestCommitTsXid = ShmemVariableCache->oldestCommitTsXid;
! newestCommitTsXid = ShmemVariableCache->newestCommitTsXid;
/* neither is invalid, or both are */
! Assert(TransactionIdIsValid(oldestCommitTsXid) == TransactionIdIsValid(newestCommitTsXid));
LWLockRelease(CommitTsLock);
/*
* Return empty if the requested value is outside our valid range.
*/
! if (!TransactionIdIsValid(oldestCommitTsXid) ||
! TransactionIdPrecedes(xid, oldestCommitTsXid) ||
! TransactionIdPrecedes(newestCommitTsXid, xid))
{
*ts = 0;
if (nodeid)
*************** ActivateCommitTs(void)
*** 655,668 ****
* enabled again? It doesn't look like it does, because there should be a
* checkpoint that sets the value to InvalidTransactionId at end of
* recovery; and so any chance of injecting new transactions without
! * CommitTs values would occur after the oldestCommitTs has been set to
* Invalid temporarily.
*/
LWLockAcquire(CommitTsLock, LW_EXCLUSIVE);
! if (ShmemVariableCache->oldestCommitTs == InvalidTransactionId)
{
! ShmemVariableCache->oldestCommitTs =
! ShmemVariableCache->newestCommitTs = ReadNewTransactionId();
}
LWLockRelease(CommitTsLock);
--- 655,668 ----
* enabled again? It doesn't look like it does, because there should be a
* checkpoint that sets the value to InvalidTransactionId at end of
* recovery; and so any chance of injecting new transactions without
! * CommitTs values would occur after the oldestCommitTsXid has been set to
* Invalid temporarily.
*/
LWLockAcquire(CommitTsLock, LW_EXCLUSIVE);
! if (ShmemVariableCache->oldestCommitTsXid == InvalidTransactionId)
{
! ShmemVariableCache->oldestCommitTsXid =
! ShmemVariableCache->newestCommitTsXid = ReadNewTransactionId();
}
LWLockRelease(CommitTsLock);
*************** DeactivateCommitTs(void)
*** 711,718 ****
TIMESTAMP_NOBEGIN(commitTsShared->dataLastCommit.time);
commitTsShared->dataLastCommit.nodeid = InvalidRepOriginId;
! ShmemVariableCache->oldestCommitTs = InvalidTransactionId;
! ShmemVariableCache->newestCommitTs = InvalidTransactionId;
LWLockRelease(CommitTsLock);
--- 711,718 ----
TIMESTAMP_NOBEGIN(commitTsShared->dataLastCommit.time);
commitTsShared->dataLastCommit.nodeid = InvalidRepOriginId;
! ShmemVariableCache->oldestCommitTsXid = InvalidTransactionId;
! ShmemVariableCache->newestCommitTsXid = InvalidTransactionId;
LWLockRelease(CommitTsLock);
*************** SetCommitTsLimit(TransactionId oldestXac
*** 832,847 ****
* "future" or signal a disabled committs.
*/
LWLockAcquire(CommitTsLock, LW_EXCLUSIVE);
! if (ShmemVariableCache->oldestCommitTs != InvalidTransactionId)
{
! if (TransactionIdPrecedes(ShmemVariableCache->oldestCommitTs, oldestXact))
! ShmemVariableCache->oldestCommitTs = oldestXact;
! if (TransactionIdPrecedes(newestXact, ShmemVariableCache->newestCommitTs))
! ShmemVariableCache->newestCommitTs = newestXact;
}
else
{
! Assert(ShmemVariableCache->newestCommitTs == InvalidTransactionId);
}
LWLockRelease(CommitTsLock);
}
--- 832,847 ----
* "future" or signal a disabled committs.
*/
LWLockAcquire(CommitTsLock, LW_EXCLUSIVE);
! if (ShmemVariableCache->oldestCommitTsXid != InvalidTransactionId)
{
! if (TransactionIdPrecedes(ShmemVariableCache->oldestCommitTsXid, oldestXact))
! ShmemVariableCache->oldestCommitTsXid = oldestXact;
! if (TransactionIdPrecedes(newestXact, ShmemVariableCache->newestCommitTsXid))
! ShmemVariableCache->newestCommitTsXid = newestXact;
}
else
{
! Assert(ShmemVariableCache->newestCommitTsXid == InvalidTransactionId);
}
LWLockRelease(CommitTsLock);
}
*************** SetCommitTsLimit(TransactionId oldestXac
*** 850,861 ****
* Move forwards the oldest commitTS value that can be consulted
*/
void
! AdvanceOldestCommitTs(TransactionId oldestXact)
{
LWLockAcquire(CommitTsLock, LW_EXCLUSIVE);
! if (ShmemVariableCache->oldestCommitTs != InvalidTransactionId &&
! TransactionIdPrecedes(ShmemVariableCache->oldestCommitTs, oldestXact))
! ShmemVariableCache->oldestCommitTs = oldestXact;
LWLockRelease(CommitTsLock);
}
--- 850,861 ----
* Move forwards the oldest commitTS value that can be consulted
*/
void
! AdvanceOldestCommitTsXid(TransactionId oldestXact)
{
LWLockAcquire(CommitTsLock, LW_EXCLUSIVE);
! if (ShmemVariableCache->oldestCommitTsXid != InvalidTransactionId &&
! TransactionIdPrecedes(ShmemVariableCache->oldestCommitTsXid, oldestXact))
! ShmemVariableCache->oldestCommitTsXid = oldestXact;
LWLockRelease(CommitTsLock);
}
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 147fd53..ce2e074 100644
*** a/src/backend/access/transam/xlog.c
--- b/src/backend/access/transam/xlog.c
*************** BootStrapXLOG(void)
*** 4782,4789 ****
checkPoint.oldestXidDB = TemplateDbOid;
checkPoint.oldestMulti = FirstMultiXactId;
checkPoint.oldestMultiDB = TemplateDbOid;
! checkPoint.oldestCommitTs = InvalidTransactionId;
! checkPoint.newestCommitTs = InvalidTransactionId;
checkPoint.time = (pg_time_t) time(NULL);
checkPoint.oldestActiveXid = InvalidTransactionId;
--- 4782,4789 ----
checkPoint.oldestXidDB = TemplateDbOid;
checkPoint.oldestMulti = FirstMultiXactId;
checkPoint.oldestMultiDB = TemplateDbOid;
! checkPoint.oldestCommitTsXid = InvalidTransactionId;
! checkPoint.newestCommitTsXid = InvalidTransactionId;
checkPoint.time = (pg_time_t) time(NULL);
checkPoint.oldestActiveXid = InvalidTransactionId;
*************** StartupXLOG(void)
*** 6298,6305 ****
checkPoint.oldestMulti, checkPoint.oldestMultiDB)));
ereport(DEBUG1,
(errmsg_internal("commit timestamp Xid oldest/newest: %u/%u",
! checkPoint.oldestCommitTs,
! checkPoint.newestCommitTs)));
if (!TransactionIdIsNormal(checkPoint.nextXid))
ereport(PANIC,
(errmsg("invalid next transaction ID")));
--- 6298,6305 ----
checkPoint.oldestMulti, checkPoint.oldestMultiDB)));
ereport(DEBUG1,
(errmsg_internal("commit timestamp Xid oldest/newest: %u/%u",
! checkPoint.oldestCommitTsXid,
! checkPoint.newestCommitTsXid)));
if (!TransactionIdIsNormal(checkPoint.nextXid))
ereport(PANIC,
(errmsg("invalid next transaction ID")));
*************** StartupXLOG(void)
*** 6311,6318 ****
MultiXactSetNextMXact(checkPoint.nextMulti, checkPoint.nextMultiOffset);
SetTransactionIdLimit(checkPoint.oldestXid, checkPoint.oldestXidDB);
SetMultiXactIdLimit(checkPoint.oldestMulti, checkPoint.oldestMultiDB);
! SetCommitTsLimit(checkPoint.oldestCommitTs,
! checkPoint.newestCommitTs);
XLogCtl->ckptXidEpoch = checkPoint.nextXidEpoch;
XLogCtl->ckptXid = checkPoint.nextXid;
--- 6311,6318 ----
MultiXactSetNextMXact(checkPoint.nextMulti, checkPoint.nextMultiOffset);
SetTransactionIdLimit(checkPoint.oldestXid, checkPoint.oldestXidDB);
SetMultiXactIdLimit(checkPoint.oldestMulti, checkPoint.oldestMultiDB);
! SetCommitTsLimit(checkPoint.oldestCommitTsXid,
! checkPoint.newestCommitTsXid);
XLogCtl->ckptXidEpoch = checkPoint.nextXidEpoch;
XLogCtl->ckptXid = checkPoint.nextXid;
*************** CreateCheckPoint(int flags)
*** 8330,8337 ****
LWLockRelease(XidGenLock);
LWLockAcquire(CommitTsLock, LW_SHARED);
! checkPoint.oldestCommitTs = ShmemVariableCache->oldestCommitTs;
! checkPoint.newestCommitTs = ShmemVariableCache->newestCommitTs;
LWLockRelease(CommitTsLock);
/* Increase XID epoch if we've wrapped around since last checkpoint */
--- 8330,8337 ----
LWLockRelease(XidGenLock);
LWLockAcquire(CommitTsLock, LW_SHARED);
! checkPoint.oldestCommitTsXid = ShmemVariableCache->oldestCommitTsXid;
! checkPoint.newestCommitTsXid = ShmemVariableCache->newestCommitTsXid;
LWLockRelease(CommitTsLock);
/* Increase XID epoch if we've wrapped around since last checkpoint */
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index 7c4ef58..be89b9b 100644
*** a/src/backend/commands/vacuum.c
--- b/src/backend/commands/vacuum.c
*************** vac_truncate_clog(TransactionId frozenXI
*** 1151,1157 ****
*/
SetTransactionIdLimit(frozenXID, oldestxid_datoid);
SetMultiXactIdLimit(minMulti, minmulti_datoid);
! AdvanceOldestCommitTs(frozenXID);
}
--- 1151,1157 ----
*/
SetTransactionIdLimit(frozenXID, oldestxid_datoid);
SetMultiXactIdLimit(minMulti, minmulti_datoid);
! AdvanceOldestCommitTsXid(frozenXID);
}
diff --git a/src/bin/pg_controldata/pg_controldata.c b/src/bin/pg_controldata/pg_controldata.c
index 32e1d81..3b52da9 100644
*** a/src/bin/pg_controldata/pg_controldata.c
--- b/src/bin/pg_controldata/pg_controldata.c
*************** main(int argc, char *argv[])
*** 220,338 ****
snprintf(sysident_str, sizeof(sysident_str), UINT64_FORMAT,
ControlFile.system_identifier);
! printf(_("pg_control version number: %u\n"),
ControlFile.pg_control_version);
if (ControlFile.pg_control_version % 65536 == 0 && ControlFile.pg_control_version / 65536 != 0)
printf(_("WARNING: possible byte ordering mismatch\n"
"The byte ordering used to store the pg_control file might not match the one\n"
"used by this program. In that case the results below would be incorrect, and\n"
"the PostgreSQL installation would be incompatible with this data directory.\n"));
! printf(_("Catalog version number: %u\n"),
ControlFile.catalog_version_no);
! printf(_("Database system identifier: %s\n"),
sysident_str);
! printf(_("Database cluster state: %s\n"),
dbState(ControlFile.state));
! printf(_("pg_control last modified: %s\n"),
pgctime_str);
! printf(_("Latest checkpoint location: %X/%X\n"),
(uint32) (ControlFile.checkPoint >> 32),
(uint32) ControlFile.checkPoint);
! printf(_("Prior checkpoint location: %X/%X\n"),
(uint32) (ControlFile.prevCheckPoint >> 32),
(uint32) ControlFile.prevCheckPoint);
! printf(_("Latest checkpoint's REDO location: %X/%X\n"),
(uint32) (ControlFile.checkPointCopy.redo >> 32),
(uint32) ControlFile.checkPointCopy.redo);
! printf(_("Latest checkpoint's REDO WAL file: %s\n"),
xlogfilename);
! printf(_("Latest checkpoint's TimeLineID: %u\n"),
ControlFile.checkPointCopy.ThisTimeLineID);
! printf(_("Latest checkpoint's PrevTimeLineID: %u\n"),
ControlFile.checkPointCopy.PrevTimeLineID);
! printf(_("Latest checkpoint's full_page_writes: %s\n"),
ControlFile.checkPointCopy.fullPageWrites ? _("on") : _("off"));
! printf(_("Latest checkpoint's NextXID: %u/%u\n"),
ControlFile.checkPointCopy.nextXidEpoch,
ControlFile.checkPointCopy.nextXid);
! printf(_("Latest checkpoint's NextOID: %u\n"),
ControlFile.checkPointCopy.nextOid);
! printf(_("Latest checkpoint's NextMultiXactId: %u\n"),
ControlFile.checkPointCopy.nextMulti);
! printf(_("Latest checkpoint's NextMultiOffset: %u\n"),
ControlFile.checkPointCopy.nextMultiOffset);
! printf(_("Latest checkpoint's oldestXID: %u\n"),
ControlFile.checkPointCopy.oldestXid);
! printf(_("Latest checkpoint's oldestXID's DB: %u\n"),
ControlFile.checkPointCopy.oldestXidDB);
! printf(_("Latest checkpoint's oldestActiveXID: %u\n"),
ControlFile.checkPointCopy.oldestActiveXid);
! printf(_("Latest checkpoint's oldestMultiXid: %u\n"),
ControlFile.checkPointCopy.oldestMulti);
! printf(_("Latest checkpoint's oldestMulti's DB: %u\n"),
ControlFile.checkPointCopy.oldestMultiDB);
! printf(_("Latest checkpoint's oldestCommitTs: %u\n"),
! ControlFile.checkPointCopy.oldestCommitTs);
! printf(_("Latest checkpoint's newestCommitTs: %u\n"),
! ControlFile.checkPointCopy.newestCommitTs);
! printf(_("Time of latest checkpoint: %s\n"),
ckpttime_str);
! printf(_("Fake LSN counter for unlogged rels: %X/%X\n"),
(uint32) (ControlFile.unloggedLSN >> 32),
(uint32) ControlFile.unloggedLSN);
! printf(_("Minimum recovery ending location: %X/%X\n"),
(uint32) (ControlFile.minRecoveryPoint >> 32),
(uint32) ControlFile.minRecoveryPoint);
! printf(_("Min recovery ending loc's timeline: %u\n"),
ControlFile.minRecoveryPointTLI);
! printf(_("Backup start location: %X/%X\n"),
(uint32) (ControlFile.backupStartPoint >> 32),
(uint32) ControlFile.backupStartPoint);
! printf(_("Backup end location: %X/%X\n"),
(uint32) (ControlFile.backupEndPoint >> 32),
(uint32) ControlFile.backupEndPoint);
! printf(_("End-of-backup record required: %s\n"),
ControlFile.backupEndRequired ? _("yes") : _("no"));
! printf(_("wal_level setting: %s\n"),
wal_level_str(ControlFile.wal_level));
! printf(_("wal_log_hints setting: %s\n"),
ControlFile.wal_log_hints ? _("on") : _("off"));
! printf(_("max_connections setting: %d\n"),
ControlFile.MaxConnections);
! printf(_("max_worker_processes setting: %d\n"),
ControlFile.max_worker_processes);
! printf(_("max_prepared_xacts setting: %d\n"),
ControlFile.max_prepared_xacts);
! printf(_("max_locks_per_xact setting: %d\n"),
ControlFile.max_locks_per_xact);
! printf(_("track_commit_timestamp setting: %s\n"),
ControlFile.track_commit_timestamp ? _("on") : _("off"));
! printf(_("Maximum data alignment: %u\n"),
ControlFile.maxAlign);
/* we don't print floatFormat since can't say much useful about it */
! printf(_("Database block size: %u\n"),
ControlFile.blcksz);
! printf(_("Blocks per segment of large relation: %u\n"),
ControlFile.relseg_size);
! printf(_("WAL block size: %u\n"),
ControlFile.xlog_blcksz);
! printf(_("Bytes per WAL segment: %u\n"),
ControlFile.xlog_seg_size);
! printf(_("Maximum length of identifiers: %u\n"),
ControlFile.nameDataLen);
! printf(_("Maximum columns in an index: %u\n"),
ControlFile.indexMaxKeys);
! printf(_("Maximum size of a TOAST chunk: %u\n"),
ControlFile.toast_max_chunk_size);
! printf(_("Size of a large-object chunk: %u\n"),
ControlFile.loblksize);
! printf(_("Date/time type storage: %s\n"),
(ControlFile.enableIntTimes ? _("64-bit integers") : _("floating-point numbers")));
! printf(_("Float4 argument passing: %s\n"),
(ControlFile.float4ByVal ? _("by value") : _("by reference")));
! printf(_("Float8 argument passing: %s\n"),
(ControlFile.float8ByVal ? _("by value") : _("by reference")));
! printf(_("Data page checksum version: %u\n"),
ControlFile.data_checksum_version);
return 0;
}
--- 220,338 ----
snprintf(sysident_str, sizeof(sysident_str), UINT64_FORMAT,
ControlFile.system_identifier);
! printf(_("pg_control version number: %u\n"),
ControlFile.pg_control_version);
if (ControlFile.pg_control_version % 65536 == 0 && ControlFile.pg_control_version / 65536 != 0)
printf(_("WARNING: possible byte ordering mismatch\n"
"The byte ordering used to store the pg_control file might not match the one\n"
"used by this program. In that case the results below would be incorrect, and\n"
"the PostgreSQL installation would be incompatible with this data directory.\n"));
! printf(_("Catalog version number: %u\n"),
ControlFile.catalog_version_no);
! printf(_("Database system identifier: %s\n"),
sysident_str);
! printf(_("Database cluster state: %s\n"),
dbState(ControlFile.state));
! printf(_("pg_control last modified: %s\n"),
pgctime_str);
! printf(_("Latest checkpoint location: %X/%X\n"),
(uint32) (ControlFile.checkPoint >> 32),
(uint32) ControlFile.checkPoint);
! printf(_("Prior checkpoint location: %X/%X\n"),
(uint32) (ControlFile.prevCheckPoint >> 32),
(uint32) ControlFile.prevCheckPoint);
! printf(_("Latest checkpoint's REDO location: %X/%X\n"),
(uint32) (ControlFile.checkPointCopy.redo >> 32),
(uint32) ControlFile.checkPointCopy.redo);
! printf(_("Latest checkpoint's REDO WAL file: %s\n"),
xlogfilename);
! printf(_("Latest checkpoint's TimeLineID: %u\n"),
ControlFile.checkPointCopy.ThisTimeLineID);
! printf(_("Latest checkpoint's PrevTimeLineID: %u\n"),
ControlFile.checkPointCopy.PrevTimeLineID);
! printf(_("Latest checkpoint's full_page_writes: %s\n"),
ControlFile.checkPointCopy.fullPageWrites ? _("on") : _("off"));
! printf(_("Latest checkpoint's NextXID: %u/%u\n"),
ControlFile.checkPointCopy.nextXidEpoch,
ControlFile.checkPointCopy.nextXid);
! printf(_("Latest checkpoint's NextOID: %u\n"),
ControlFile.checkPointCopy.nextOid);
! printf(_("Latest checkpoint's NextMultiXactId: %u\n"),
ControlFile.checkPointCopy.nextMulti);
! printf(_("Latest checkpoint's NextMultiOffset: %u\n"),
ControlFile.checkPointCopy.nextMultiOffset);
! printf(_("Latest checkpoint's oldestXID: %u\n"),
ControlFile.checkPointCopy.oldestXid);
! printf(_("Latest checkpoint's oldestXID's DB: %u\n"),
ControlFile.checkPointCopy.oldestXidDB);
! printf(_("Latest checkpoint's oldestActiveXID: %u\n"),
ControlFile.checkPointCopy.oldestActiveXid);
! printf(_("Latest checkpoint's oldestMultiXid: %u\n"),
ControlFile.checkPointCopy.oldestMulti);
! printf(_("Latest checkpoint's oldestMulti's DB: %u\n"),
ControlFile.checkPointCopy.oldestMultiDB);
! printf(_("Latest checkpoint's oldestCommitTsXid: %u\n"),
! ControlFile.checkPointCopy.oldestCommitTsXid);
! printf(_("Latest checkpoint's newestCommitTsXid: %u\n"),
! ControlFile.checkPointCopy.newestCommitTsXid);
! printf(_("Time of latest checkpoint: %s\n"),
ckpttime_str);
! printf(_("Fake LSN counter for unlogged rels: %X/%X\n"),
(uint32) (ControlFile.unloggedLSN >> 32),
(uint32) ControlFile.unloggedLSN);
! printf(_("Minimum recovery ending location: %X/%X\n"),
(uint32) (ControlFile.minRecoveryPoint >> 32),
(uint32) ControlFile.minRecoveryPoint);
! printf(_("Min recovery ending loc's timeline: %u\n"),
ControlFile.minRecoveryPointTLI);
! printf(_("Backup start location: %X/%X\n"),
(uint32) (ControlFile.backupStartPoint >> 32),
(uint32) ControlFile.backupStartPoint);
! printf(_("Backup end location: %X/%X\n"),
(uint32) (ControlFile.backupEndPoint >> 32),
(uint32) ControlFile.backupEndPoint);
! printf(_("End-of-backup record required: %s\n"),
ControlFile.backupEndRequired ? _("yes") : _("no"));
! printf(_("wal_level setting: %s\n"),
wal_level_str(ControlFile.wal_level));
! printf(_("wal_log_hints setting: %s\n"),
ControlFile.wal_log_hints ? _("on") : _("off"));
! printf(_("max_connections setting: %d\n"),
ControlFile.MaxConnections);
! printf(_("max_worker_processes setting: %d\n"),
ControlFile.max_worker_processes);
! printf(_("max_prepared_xacts setting: %d\n"),
ControlFile.max_prepared_xacts);
! printf(_("max_locks_per_xact setting: %d\n"),
ControlFile.max_locks_per_xact);
! printf(_("track_commit_timestamp setting: %s\n"),
ControlFile.track_commit_timestamp ? _("on") : _("off"));
! printf(_("Maximum data alignment: %u\n"),
ControlFile.maxAlign);
/* we don't print floatFormat since can't say much useful about it */
! printf(_("Database block size: %u\n"),
ControlFile.blcksz);
! printf(_("Blocks per segment of large relation: %u\n"),
ControlFile.relseg_size);
! printf(_("WAL block size: %u\n"),
ControlFile.xlog_blcksz);
! printf(_("Bytes per WAL segment: %u\n"),
ControlFile.xlog_seg_size);
! printf(_("Maximum length of identifiers: %u\n"),
ControlFile.nameDataLen);
! printf(_("Maximum columns in an index: %u\n"),
ControlFile.indexMaxKeys);
! printf(_("Maximum size of a TOAST chunk: %u\n"),
ControlFile.toast_max_chunk_size);
! printf(_("Size of a large-object chunk: %u\n"),
ControlFile.loblksize);
! printf(_("Date/time type storage: %s\n"),
(ControlFile.enableIntTimes ? _("64-bit integers") : _("floating-point numbers")));
! printf(_("Float4 argument passing: %s\n"),
(ControlFile.float4ByVal ? _("by value") : _("by reference")));
! printf(_("Float8 argument passing: %s\n"),
(ControlFile.float8ByVal ? _("by value") : _("by reference")));
! printf(_("Data page checksum version: %u\n"),
ControlFile.data_checksum_version);
return 0;
}
diff --git a/src/bin/pg_resetxlog/pg_resetxlog.c b/src/bin/pg_resetxlog/pg_resetxlog.c
index d7ac2ba..7cd2c40 100644
*** a/src/bin/pg_resetxlog/pg_resetxlog.c
--- b/src/bin/pg_resetxlog/pg_resetxlog.c
*************** static bool guessed = false; /* T if we
*** 64,71 ****
static const char *progname;
static uint32 set_xid_epoch = (uint32) -1;
static TransactionId set_xid = 0;
! static TransactionId set_oldest_commit_ts = 0;
! static TransactionId set_newest_commit_ts = 0;
static Oid set_oid = 0;
static MultiXactId set_mxid = 0;
static MultiXactOffset set_mxoff = (MultiXactOffset) -1;
--- 64,71 ----
static const char *progname;
static uint32 set_xid_epoch = (uint32) -1;
static TransactionId set_xid = 0;
! static TransactionId set_oldest_commit_ts_xid = 0;
! static TransactionId set_newest_commit_ts_xid = 0;
static Oid set_oid = 0;
static MultiXactId set_mxid = 0;
static MultiXactOffset set_mxoff = (MultiXactOffset) -1;
*************** main(int argc, char *argv[])
*** 164,177 ****
break;
case 'c':
! set_oldest_commit_ts = strtoul(optarg, &endptr, 0);
if (endptr == optarg || *endptr != ',')
{
fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-c");
fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
! set_newest_commit_ts = strtoul(endptr + 1, &endptr2, 0);
if (endptr2 == endptr + 1 || *endptr2 != '\0')
{
fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-c");
--- 164,177 ----
break;
case 'c':
! set_oldest_commit_ts_xid = strtoul(optarg, &endptr, 0);
if (endptr == optarg || *endptr != ',')
{
fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-c");
fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
! set_newest_commit_ts_xid = strtoul(endptr + 1, &endptr2, 0);
if (endptr2 == endptr + 1 || *endptr2 != '\0')
{
fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-c");
*************** main(int argc, char *argv[])
*** 179,193 ****
exit(1);
}
! if (set_oldest_commit_ts < 2 &&
! set_oldest_commit_ts != 0)
{
fprintf(stderr, _("%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"), progname);
exit(1);
}
! if (set_newest_commit_ts < 2 &&
! set_newest_commit_ts != 0)
{
fprintf(stderr, _("%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"), progname);
exit(1);
--- 179,193 ----
exit(1);
}
! if (set_oldest_commit_ts_xid < 2 &&
! set_oldest_commit_ts_xid != 0)
{
fprintf(stderr, _("%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"), progname);
exit(1);
}
! if (set_newest_commit_ts_xid < 2 &&
! set_newest_commit_ts_xid != 0)
{
fprintf(stderr, _("%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"), progname);
exit(1);
*************** main(int argc, char *argv[])
*** 383,392 ****
ControlFile.checkPointCopy.oldestXidDB = InvalidOid;
}
! if (set_oldest_commit_ts != 0)
! ControlFile.checkPointCopy.oldestCommitTs = set_oldest_commit_ts;
! if (set_newest_commit_ts != 0)
! ControlFile.checkPointCopy.newestCommitTs = set_newest_commit_ts;
if (set_oid != 0)
ControlFile.checkPointCopy.nextOid = set_oid;
--- 383,392 ----
ControlFile.checkPointCopy.oldestXidDB = InvalidOid;
}
! if (set_oldest_commit_ts_xid != 0)
! ControlFile.checkPointCopy.oldestCommitTsXid = set_oldest_commit_ts_xid;
! if (set_newest_commit_ts_xid != 0)
! ControlFile.checkPointCopy.newestCommitTsXid = set_newest_commit_ts_xid;
if (set_oid != 0)
ControlFile.checkPointCopy.nextOid = set_oid;
*************** PrintControlValues(bool guessed)
*** 636,700 ****
snprintf(sysident_str, sizeof(sysident_str), UINT64_FORMAT,
ControlFile.system_identifier);
! printf(_("pg_control version number: %u\n"),
ControlFile.pg_control_version);
! printf(_("Catalog version number: %u\n"),
ControlFile.catalog_version_no);
! printf(_("Database system identifier: %s\n"),
sysident_str);
! printf(_("Latest checkpoint's TimeLineID: %u\n"),
ControlFile.checkPointCopy.ThisTimeLineID);
! printf(_("Latest checkpoint's full_page_writes: %s\n"),
ControlFile.checkPointCopy.fullPageWrites ? _("on") : _("off"));
! printf(_("Latest checkpoint's NextXID: %u/%u\n"),
ControlFile.checkPointCopy.nextXidEpoch,
ControlFile.checkPointCopy.nextXid);
! printf(_("Latest checkpoint's NextOID: %u\n"),
ControlFile.checkPointCopy.nextOid);
! printf(_("Latest checkpoint's NextMultiXactId: %u\n"),
ControlFile.checkPointCopy.nextMulti);
! printf(_("Latest checkpoint's NextMultiOffset: %u\n"),
ControlFile.checkPointCopy.nextMultiOffset);
! printf(_("Latest checkpoint's oldestXID: %u\n"),
ControlFile.checkPointCopy.oldestXid);
! printf(_("Latest checkpoint's oldestXID's DB: %u\n"),
ControlFile.checkPointCopy.oldestXidDB);
! printf(_("Latest checkpoint's oldestActiveXID: %u\n"),
ControlFile.checkPointCopy.oldestActiveXid);
! printf(_("Latest checkpoint's oldestMultiXid: %u\n"),
ControlFile.checkPointCopy.oldestMulti);
! printf(_("Latest checkpoint's oldestMulti's DB: %u\n"),
ControlFile.checkPointCopy.oldestMultiDB);
! printf(_("Latest checkpoint's oldestCommitTs: %u\n"),
! ControlFile.checkPointCopy.oldestCommitTs);
! printf(_("Latest checkpoint's newestCommitTs: %u\n"),
! ControlFile.checkPointCopy.newestCommitTs);
! printf(_("Maximum data alignment: %u\n"),
ControlFile.maxAlign);
/* we don't print floatFormat since can't say much useful about it */
! printf(_("Database block size: %u\n"),
ControlFile.blcksz);
! printf(_("Blocks per segment of large relation: %u\n"),
ControlFile.relseg_size);
! printf(_("WAL block size: %u\n"),
ControlFile.xlog_blcksz);
! printf(_("Bytes per WAL segment: %u\n"),
ControlFile.xlog_seg_size);
! printf(_("Maximum length of identifiers: %u\n"),
ControlFile.nameDataLen);
! printf(_("Maximum columns in an index: %u\n"),
ControlFile.indexMaxKeys);
! printf(_("Maximum size of a TOAST chunk: %u\n"),
ControlFile.toast_max_chunk_size);
! printf(_("Size of a large-object chunk: %u\n"),
ControlFile.loblksize);
! printf(_("Date/time type storage: %s\n"),
(ControlFile.enableIntTimes ? _("64-bit integers") : _("floating-point numbers")));
! printf(_("Float4 argument passing: %s\n"),
(ControlFile.float4ByVal ? _("by value") : _("by reference")));
! printf(_("Float8 argument passing: %s\n"),
(ControlFile.float8ByVal ? _("by value") : _("by reference")));
! printf(_("Data page checksum version: %u\n"),
ControlFile.data_checksum_version);
}
--- 636,700 ----
snprintf(sysident_str, sizeof(sysident_str), UINT64_FORMAT,
ControlFile.system_identifier);
! printf(_("pg_control version number: %u\n"),
ControlFile.pg_control_version);
! printf(_("Catalog version number: %u\n"),
ControlFile.catalog_version_no);
! printf(_("Database system identifier: %s\n"),
sysident_str);
! printf(_("Latest checkpoint's TimeLineID: %u\n"),
ControlFile.checkPointCopy.ThisTimeLineID);
! printf(_("Latest checkpoint's full_page_writes: %s\n"),
ControlFile.checkPointCopy.fullPageWrites ? _("on") : _("off"));
! printf(_("Latest checkpoint's NextXID: %u/%u\n"),
ControlFile.checkPointCopy.nextXidEpoch,
ControlFile.checkPointCopy.nextXid);
! printf(_("Latest checkpoint's NextOID: %u\n"),
ControlFile.checkPointCopy.nextOid);
! printf(_("Latest checkpoint's NextMultiXactId: %u\n"),
ControlFile.checkPointCopy.nextMulti);
! printf(_("Latest checkpoint's NextMultiOffset: %u\n"),
ControlFile.checkPointCopy.nextMultiOffset);
! printf(_("Latest checkpoint's oldestXID: %u\n"),
ControlFile.checkPointCopy.oldestXid);
! printf(_("Latest checkpoint's oldestXID's DB: %u\n"),
ControlFile.checkPointCopy.oldestXidDB);
! printf(_("Latest checkpoint's oldestActiveXID: %u\n"),
ControlFile.checkPointCopy.oldestActiveXid);
! printf(_("Latest checkpoint's oldestMultiXid: %u\n"),
ControlFile.checkPointCopy.oldestMulti);
! printf(_("Latest checkpoint's oldestMulti's DB: %u\n"),
ControlFile.checkPointCopy.oldestMultiDB);
! printf(_("Latest checkpoint's oldestCommitTsXid: %u\n"),
! ControlFile.checkPointCopy.oldestCommitTsXid);
! printf(_("Latest checkpoint's newestCommitTsXid: %u\n"),
! ControlFile.checkPointCopy.newestCommitTsXid);
! printf(_("Maximum data alignment: %u\n"),
ControlFile.maxAlign);
/* we don't print floatFormat since can't say much useful about it */
! printf(_("Database block size: %u\n"),
ControlFile.blcksz);
! printf(_("Blocks per segment of large relation: %u\n"),
ControlFile.relseg_size);
! printf(_("WAL block size: %u\n"),
ControlFile.xlog_blcksz);
! printf(_("Bytes per WAL segment: %u\n"),
ControlFile.xlog_seg_size);
! printf(_("Maximum length of identifiers: %u\n"),
ControlFile.nameDataLen);
! printf(_("Maximum columns in an index: %u\n"),
ControlFile.indexMaxKeys);
! printf(_("Maximum size of a TOAST chunk: %u\n"),
ControlFile.toast_max_chunk_size);
! printf(_("Size of a large-object chunk: %u\n"),
ControlFile.loblksize);
! printf(_("Date/time type storage: %s\n"),
(ControlFile.enableIntTimes ? _("64-bit integers") : _("floating-point numbers")));
! printf(_("Float4 argument passing: %s\n"),
(ControlFile.float4ByVal ? _("by value") : _("by reference")));
! printf(_("Float8 argument passing: %s\n"),
(ControlFile.float8ByVal ? _("by value") : _("by reference")));
! printf(_("Data page checksum version: %u\n"),
ControlFile.data_checksum_version);
}
*************** PrintNewControlValues(void)
*** 751,765 ****
ControlFile.checkPointCopy.nextXidEpoch);
}
! if (set_oldest_commit_ts != 0)
{
! printf(_("oldestCommitTs: %u\n"),
! ControlFile.checkPointCopy.oldestCommitTs);
}
! if (set_newest_commit_ts != 0)
{
! printf(_("newestCommitTs: %u\n"),
! ControlFile.checkPointCopy.newestCommitTs);
}
}
--- 751,765 ----
ControlFile.checkPointCopy.nextXidEpoch);
}
! if (set_oldest_commit_ts_xid != 0)
{
! printf(_("oldestCommitTsXid: %u\n"),
! ControlFile.checkPointCopy.oldestCommitTsXid);
}
! if (set_newest_commit_ts_xid != 0)
{
! printf(_("newestCommitTsXid: %u\n"),
! ControlFile.checkPointCopy.newestCommitTsXid);
}
}
diff --git a/src/include/access/commit_ts.h b/src/include/access/commit_ts.h
index 425f258..b11715a 100644
*** a/src/include/access/commit_ts.h
--- b/src/include/access/commit_ts.h
*************** extern void ExtendCommitTs(TransactionId
*** 43,49 ****
extern void TruncateCommitTs(TransactionId oldestXact);
extern void SetCommitTsLimit(TransactionId oldestXact,
TransactionId newestXact);
! extern void AdvanceOldestCommitTs(TransactionId oldestXact);
/* XLOG stuff */
#define COMMIT_TS_ZEROPAGE 0x00
--- 43,49 ----
extern void TruncateCommitTs(TransactionId oldestXact);
extern void SetCommitTsLimit(TransactionId oldestXact,
TransactionId newestXact);
! extern void AdvanceOldestCommitTsXid(TransactionId oldestXact);
/* XLOG stuff */
#define COMMIT_TS_ZEROPAGE 0x00
diff --git a/src/include/access/transam.h b/src/include/access/transam.h
index 96b3fac..9ad5761 100644
*** a/src/include/access/transam.h
--- b/src/include/access/transam.h
*************** typedef struct VariableCacheData
*** 126,133 ****
/*
* These fields are protected by CommitTsLock
*/
! TransactionId oldestCommitTs;
! TransactionId newestCommitTs;
/*
* These fields are protected by ProcArrayLock.
--- 126,133 ----
/*
* These fields are protected by CommitTsLock
*/
! TransactionId oldestCommitTsXid;
! TransactionId newestCommitTsXid;
/*
* These fields are protected by ProcArrayLock.
diff --git a/src/include/catalog/pg_control.h b/src/include/catalog/pg_control.h
index ad1eb4b..0b8bea7 100644
*** a/src/include/catalog/pg_control.h
--- b/src/include/catalog/pg_control.h
*************** typedef struct CheckPoint
*** 46,54 ****
MultiXactId oldestMulti; /* cluster-wide minimum datminmxid */
Oid oldestMultiDB; /* database with minimum datminmxid */
pg_time_t time; /* time stamp of checkpoint */
! TransactionId oldestCommitTs; /* oldest Xid with valid commit
* timestamp */
! TransactionId newestCommitTs; /* newest Xid with valid commit
* timestamp */
/*
--- 46,54 ----
MultiXactId oldestMulti; /* cluster-wide minimum datminmxid */
Oid oldestMultiDB; /* database with minimum datminmxid */
pg_time_t time; /* time stamp of checkpoint */
! TransactionId oldestCommitTsXid; /* oldest Xid with valid commit
* timestamp */
! TransactionId newestCommitTsXid; /* newest Xid with valid commit
* timestamp */
/*
Joe Conway <mail@joeconway.com> writes:
I think the attached does the job. Note I settled on
(new|old)estCommitTsXid as that seemed most descriptive and not horribly
longer than before. It did mean, however, that I needed to add a single
space to all the output in pg_resetxlog and pg_controldata, which added
a fair amount to the patch size.
Hm. That will break all the translations for those messages, no?
Not sure it's worth it.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Tom Lane wrote:
Joe Conway <mail@joeconway.com> writes:
I think the attached does the job. Note I settled on
(new|old)estCommitTsXid as that seemed most descriptive and not horribly
longer than before. It did mean, however, that I needed to add a single
space to all the output in pg_resetxlog and pg_controldata, which added
a fair amount to the patch size.Hm. That will break all the translations for those messages, no?
Not sure it's worth it.
Yeah, I would leave the others alone and just let this line have the
value shifted one more column to the right.
--
�lvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 12/28/2015 10:30 AM, Alvaro Herrera wrote:
Tom Lane wrote:
Joe Conway <mail@joeconway.com> writes:
I think the attached does the job. Note I settled on
(new|old)estCommitTsXid as that seemed most descriptive and not horribly
longer than before. It did mean, however, that I needed to add a single
space to all the output in pg_resetxlog and pg_controldata, which added
a fair amount to the patch size.Hm. That will break all the translations for those messages, no?
Not sure it's worth it.Yeah, I would leave the others alone and just let this line have the
value shifted one more column to the right.
Seems like the translation issue would be mostly 9.5. Maybe we should
add the space in master but not 9.5?
An alternative would be to not have a space at all for those two, e.g.
"Latest checkpoint's oldestCommitTsXid:%u\n"
"Latest checkpoint's newestCommitTsXid:%u\n"
That isn't too bad and would leave everything aligned.
Joe
--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development
On 12/28/2015 10:35 AM, Joe Conway wrote:
An alternative would be to not have a space at all for those two, e.g.
"Latest checkpoint's oldestCommitTsXid:%u\n"
"Latest checkpoint's newestCommitTsXid:%u\n"That isn't too bad and would leave everything aligned.
That seems like the best solution to me.
8<-----------------------
...
Latest checkpoint's oldestMultiXid: 1
Latest checkpoint's oldestMulti's DB: 1
Latest checkpoint's oldestCommitTsXid:0
Latest checkpoint's newestCommitTsXid:0
Time of latest checkpoint: Thu 24 Dec 2015 08:55:27 AM PST
Fake LSN counter for unlogged rels: 0/1
...
8<-----------------------
Anyone parsing based on fixed length would be ok, and so would anyone
splitting on the colon.
I retract my earlier suggestion of doing HEAD different from
REL9_5_STABLE, at least for the moment. My patch for pg_controldata
related functions is going to impact all this anyway, so we might as
well not fuss about it now.
Any objections to the attached?
Joe
--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development
Attachments:
committsxid-95.00.difftext/x-diff; name=committsxid-95.00.diffDownload
diff --git a/src/backend/access/rmgrdesc/xlogdesc.c b/src/backend/access/rmgrdesc/xlogdesc.c
index 83cc9e8..5e210b9 100644
*** a/src/backend/access/rmgrdesc/xlogdesc.c
--- b/src/backend/access/rmgrdesc/xlogdesc.c
*************** xlog_desc(StringInfo buf, XLogReaderStat
*** 59,66 ****
checkpoint->oldestXidDB,
checkpoint->oldestMulti,
checkpoint->oldestMultiDB,
! checkpoint->oldestCommitTs,
! checkpoint->newestCommitTs,
checkpoint->oldestActiveXid,
(info == XLOG_CHECKPOINT_SHUTDOWN) ? "shutdown" : "online");
}
--- 59,66 ----
checkpoint->oldestXidDB,
checkpoint->oldestMulti,
checkpoint->oldestMultiDB,
! checkpoint->oldestCommitTsXid,
! checkpoint->newestCommitTsXid,
checkpoint->oldestActiveXid,
(info == XLOG_CHECKPOINT_SHUTDOWN) ? "shutdown" : "online");
}
diff --git a/src/backend/access/transam/commit_ts.c b/src/backend/access/transam/commit_ts.c
index ed8d98a..a284894 100644
*** a/src/backend/access/transam/commit_ts.c
--- b/src/backend/access/transam/commit_ts.c
*************** TransactionTreeSetCommitTsData(Transacti
*** 217,224 ****
commitTsShared->dataLastCommit.nodeid = nodeid;
/* and move forwards our endpoint, if needed */
! if (TransactionIdPrecedes(ShmemVariableCache->newestCommitTs, newestXact))
! ShmemVariableCache->newestCommitTs = newestXact;
LWLockRelease(CommitTsLock);
}
--- 217,224 ----
commitTsShared->dataLastCommit.nodeid = nodeid;
/* and move forwards our endpoint, if needed */
! if (TransactionIdPrecedes(ShmemVariableCache->newestCommitTsXid, newestXact))
! ShmemVariableCache->newestCommitTsXid = newestXact;
LWLockRelease(CommitTsLock);
}
*************** TransactionIdGetCommitTsData(Transaction
*** 285,292 ****
int entryno = TransactionIdToCTsEntry(xid);
int slotno;
CommitTimestampEntry entry;
! TransactionId oldestCommitTs;
! TransactionId newestCommitTs;
/* error if the given Xid doesn't normally commit */
if (!TransactionIdIsNormal(xid))
--- 285,292 ----
int entryno = TransactionIdToCTsEntry(xid);
int slotno;
CommitTimestampEntry entry;
! TransactionId oldestCommitTsXid;
! TransactionId newestCommitTsXid;
/* error if the given Xid doesn't normally commit */
if (!TransactionIdIsNormal(xid))
*************** TransactionIdGetCommitTsData(Transaction
*** 314,331 ****
return *ts != 0;
}
! oldestCommitTs = ShmemVariableCache->oldestCommitTs;
! newestCommitTs = ShmemVariableCache->newestCommitTs;
/* neither is invalid, or both are */
! Assert(TransactionIdIsValid(oldestCommitTs) == TransactionIdIsValid(newestCommitTs));
LWLockRelease(CommitTsLock);
/*
* Return empty if the requested value is outside our valid range.
*/
! if (!TransactionIdIsValid(oldestCommitTs) ||
! TransactionIdPrecedes(xid, oldestCommitTs) ||
! TransactionIdPrecedes(newestCommitTs, xid))
{
*ts = 0;
if (nodeid)
--- 314,331 ----
return *ts != 0;
}
! oldestCommitTsXid = ShmemVariableCache->oldestCommitTsXid;
! newestCommitTsXid = ShmemVariableCache->newestCommitTsXid;
/* neither is invalid, or both are */
! Assert(TransactionIdIsValid(oldestCommitTsXid) == TransactionIdIsValid(newestCommitTsXid));
LWLockRelease(CommitTsLock);
/*
* Return empty if the requested value is outside our valid range.
*/
! if (!TransactionIdIsValid(oldestCommitTsXid) ||
! TransactionIdPrecedes(xid, oldestCommitTsXid) ||
! TransactionIdPrecedes(newestCommitTsXid, xid))
{
*ts = 0;
if (nodeid)
*************** ActivateCommitTs(void)
*** 655,668 ****
* enabled again? It doesn't look like it does, because there should be a
* checkpoint that sets the value to InvalidTransactionId at end of
* recovery; and so any chance of injecting new transactions without
! * CommitTs values would occur after the oldestCommitTs has been set to
* Invalid temporarily.
*/
LWLockAcquire(CommitTsLock, LW_EXCLUSIVE);
! if (ShmemVariableCache->oldestCommitTs == InvalidTransactionId)
{
! ShmemVariableCache->oldestCommitTs =
! ShmemVariableCache->newestCommitTs = ReadNewTransactionId();
}
LWLockRelease(CommitTsLock);
--- 655,668 ----
* enabled again? It doesn't look like it does, because there should be a
* checkpoint that sets the value to InvalidTransactionId at end of
* recovery; and so any chance of injecting new transactions without
! * CommitTs values would occur after the oldestCommitTsXid has been set to
* Invalid temporarily.
*/
LWLockAcquire(CommitTsLock, LW_EXCLUSIVE);
! if (ShmemVariableCache->oldestCommitTsXid == InvalidTransactionId)
{
! ShmemVariableCache->oldestCommitTsXid =
! ShmemVariableCache->newestCommitTsXid = ReadNewTransactionId();
}
LWLockRelease(CommitTsLock);
*************** DeactivateCommitTs(void)
*** 711,718 ****
TIMESTAMP_NOBEGIN(commitTsShared->dataLastCommit.time);
commitTsShared->dataLastCommit.nodeid = InvalidRepOriginId;
! ShmemVariableCache->oldestCommitTs = InvalidTransactionId;
! ShmemVariableCache->newestCommitTs = InvalidTransactionId;
LWLockRelease(CommitTsLock);
--- 711,718 ----
TIMESTAMP_NOBEGIN(commitTsShared->dataLastCommit.time);
commitTsShared->dataLastCommit.nodeid = InvalidRepOriginId;
! ShmemVariableCache->oldestCommitTsXid = InvalidTransactionId;
! ShmemVariableCache->newestCommitTsXid = InvalidTransactionId;
LWLockRelease(CommitTsLock);
*************** SetCommitTsLimit(TransactionId oldestXac
*** 832,847 ****
* "future" or signal a disabled committs.
*/
LWLockAcquire(CommitTsLock, LW_EXCLUSIVE);
! if (ShmemVariableCache->oldestCommitTs != InvalidTransactionId)
{
! if (TransactionIdPrecedes(ShmemVariableCache->oldestCommitTs, oldestXact))
! ShmemVariableCache->oldestCommitTs = oldestXact;
! if (TransactionIdPrecedes(newestXact, ShmemVariableCache->newestCommitTs))
! ShmemVariableCache->newestCommitTs = newestXact;
}
else
{
! Assert(ShmemVariableCache->newestCommitTs == InvalidTransactionId);
}
LWLockRelease(CommitTsLock);
}
--- 832,847 ----
* "future" or signal a disabled committs.
*/
LWLockAcquire(CommitTsLock, LW_EXCLUSIVE);
! if (ShmemVariableCache->oldestCommitTsXid != InvalidTransactionId)
{
! if (TransactionIdPrecedes(ShmemVariableCache->oldestCommitTsXid, oldestXact))
! ShmemVariableCache->oldestCommitTsXid = oldestXact;
! if (TransactionIdPrecedes(newestXact, ShmemVariableCache->newestCommitTsXid))
! ShmemVariableCache->newestCommitTsXid = newestXact;
}
else
{
! Assert(ShmemVariableCache->newestCommitTsXid == InvalidTransactionId);
}
LWLockRelease(CommitTsLock);
}
*************** SetCommitTsLimit(TransactionId oldestXac
*** 850,861 ****
* Move forwards the oldest commitTS value that can be consulted
*/
void
! AdvanceOldestCommitTs(TransactionId oldestXact)
{
LWLockAcquire(CommitTsLock, LW_EXCLUSIVE);
! if (ShmemVariableCache->oldestCommitTs != InvalidTransactionId &&
! TransactionIdPrecedes(ShmemVariableCache->oldestCommitTs, oldestXact))
! ShmemVariableCache->oldestCommitTs = oldestXact;
LWLockRelease(CommitTsLock);
}
--- 850,861 ----
* Move forwards the oldest commitTS value that can be consulted
*/
void
! AdvanceOldestCommitTsXid(TransactionId oldestXact)
{
LWLockAcquire(CommitTsLock, LW_EXCLUSIVE);
! if (ShmemVariableCache->oldestCommitTsXid != InvalidTransactionId &&
! TransactionIdPrecedes(ShmemVariableCache->oldestCommitTsXid, oldestXact))
! ShmemVariableCache->oldestCommitTsXid = oldestXact;
LWLockRelease(CommitTsLock);
}
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 71fc8ff..06a361a 100644
*** a/src/backend/access/transam/xlog.c
--- b/src/backend/access/transam/xlog.c
*************** BootStrapXLOG(void)
*** 4786,4793 ****
checkPoint.oldestXidDB = TemplateDbOid;
checkPoint.oldestMulti = FirstMultiXactId;
checkPoint.oldestMultiDB = TemplateDbOid;
! checkPoint.oldestCommitTs = InvalidTransactionId;
! checkPoint.newestCommitTs = InvalidTransactionId;
checkPoint.time = (pg_time_t) time(NULL);
checkPoint.oldestActiveXid = InvalidTransactionId;
--- 4786,4793 ----
checkPoint.oldestXidDB = TemplateDbOid;
checkPoint.oldestMulti = FirstMultiXactId;
checkPoint.oldestMultiDB = TemplateDbOid;
! checkPoint.oldestCommitTsXid = InvalidTransactionId;
! checkPoint.newestCommitTsXid = InvalidTransactionId;
checkPoint.time = (pg_time_t) time(NULL);
checkPoint.oldestActiveXid = InvalidTransactionId;
*************** StartupXLOG(void)
*** 6302,6309 ****
checkPoint.oldestMulti, checkPoint.oldestMultiDB)));
ereport(DEBUG1,
(errmsg_internal("commit timestamp Xid oldest/newest: %u/%u",
! checkPoint.oldestCommitTs,
! checkPoint.newestCommitTs)));
if (!TransactionIdIsNormal(checkPoint.nextXid))
ereport(PANIC,
(errmsg("invalid next transaction ID")));
--- 6302,6309 ----
checkPoint.oldestMulti, checkPoint.oldestMultiDB)));
ereport(DEBUG1,
(errmsg_internal("commit timestamp Xid oldest/newest: %u/%u",
! checkPoint.oldestCommitTsXid,
! checkPoint.newestCommitTsXid)));
if (!TransactionIdIsNormal(checkPoint.nextXid))
ereport(PANIC,
(errmsg("invalid next transaction ID")));
*************** StartupXLOG(void)
*** 6315,6322 ****
MultiXactSetNextMXact(checkPoint.nextMulti, checkPoint.nextMultiOffset);
SetTransactionIdLimit(checkPoint.oldestXid, checkPoint.oldestXidDB);
SetMultiXactIdLimit(checkPoint.oldestMulti, checkPoint.oldestMultiDB);
! SetCommitTsLimit(checkPoint.oldestCommitTs,
! checkPoint.newestCommitTs);
XLogCtl->ckptXidEpoch = checkPoint.nextXidEpoch;
XLogCtl->ckptXid = checkPoint.nextXid;
--- 6315,6322 ----
MultiXactSetNextMXact(checkPoint.nextMulti, checkPoint.nextMultiOffset);
SetTransactionIdLimit(checkPoint.oldestXid, checkPoint.oldestXidDB);
SetMultiXactIdLimit(checkPoint.oldestMulti, checkPoint.oldestMultiDB);
! SetCommitTsLimit(checkPoint.oldestCommitTsXid,
! checkPoint.newestCommitTsXid);
XLogCtl->ckptXidEpoch = checkPoint.nextXidEpoch;
XLogCtl->ckptXid = checkPoint.nextXid;
*************** CreateCheckPoint(int flags)
*** 8334,8341 ****
LWLockRelease(XidGenLock);
LWLockAcquire(CommitTsLock, LW_SHARED);
! checkPoint.oldestCommitTs = ShmemVariableCache->oldestCommitTs;
! checkPoint.newestCommitTs = ShmemVariableCache->newestCommitTs;
LWLockRelease(CommitTsLock);
/* Increase XID epoch if we've wrapped around since last checkpoint */
--- 8334,8341 ----
LWLockRelease(XidGenLock);
LWLockAcquire(CommitTsLock, LW_SHARED);
! checkPoint.oldestCommitTsXid = ShmemVariableCache->oldestCommitTsXid;
! checkPoint.newestCommitTsXid = ShmemVariableCache->newestCommitTsXid;
LWLockRelease(CommitTsLock);
/* Increase XID epoch if we've wrapped around since last checkpoint */
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index 7c4ef58..be89b9b 100644
*** a/src/backend/commands/vacuum.c
--- b/src/backend/commands/vacuum.c
*************** vac_truncate_clog(TransactionId frozenXI
*** 1151,1157 ****
*/
SetTransactionIdLimit(frozenXID, oldestxid_datoid);
SetMultiXactIdLimit(minMulti, minmulti_datoid);
! AdvanceOldestCommitTs(frozenXID);
}
--- 1151,1157 ----
*/
SetTransactionIdLimit(frozenXID, oldestxid_datoid);
SetMultiXactIdLimit(minMulti, minmulti_datoid);
! AdvanceOldestCommitTsXid(frozenXID);
}
diff --git a/src/bin/pg_controldata/pg_controldata.c b/src/bin/pg_controldata/pg_controldata.c
index 32e1d81..e7e072f 100644
*** a/src/bin/pg_controldata/pg_controldata.c
--- b/src/bin/pg_controldata/pg_controldata.c
*************** main(int argc, char *argv[])
*** 271,280 ****
ControlFile.checkPointCopy.oldestMulti);
printf(_("Latest checkpoint's oldestMulti's DB: %u\n"),
ControlFile.checkPointCopy.oldestMultiDB);
! printf(_("Latest checkpoint's oldestCommitTs: %u\n"),
! ControlFile.checkPointCopy.oldestCommitTs);
! printf(_("Latest checkpoint's newestCommitTs: %u\n"),
! ControlFile.checkPointCopy.newestCommitTs);
printf(_("Time of latest checkpoint: %s\n"),
ckpttime_str);
printf(_("Fake LSN counter for unlogged rels: %X/%X\n"),
--- 271,280 ----
ControlFile.checkPointCopy.oldestMulti);
printf(_("Latest checkpoint's oldestMulti's DB: %u\n"),
ControlFile.checkPointCopy.oldestMultiDB);
! printf(_("Latest checkpoint's oldestCommitTsXid:%u\n"),
! ControlFile.checkPointCopy.oldestCommitTsXid);
! printf(_("Latest checkpoint's newestCommitTsXid:%u\n"),
! ControlFile.checkPointCopy.newestCommitTsXid);
printf(_("Time of latest checkpoint: %s\n"),
ckpttime_str);
printf(_("Fake LSN counter for unlogged rels: %X/%X\n"),
diff --git a/src/bin/pg_resetxlog/pg_resetxlog.c b/src/bin/pg_resetxlog/pg_resetxlog.c
index 8826960..6615aea 100644
*** a/src/bin/pg_resetxlog/pg_resetxlog.c
--- b/src/bin/pg_resetxlog/pg_resetxlog.c
*************** static bool guessed = false; /* T if we
*** 64,71 ****
static const char *progname;
static uint32 set_xid_epoch = (uint32) -1;
static TransactionId set_xid = 0;
! static TransactionId set_oldest_commit_ts = 0;
! static TransactionId set_newest_commit_ts = 0;
static Oid set_oid = 0;
static MultiXactId set_mxid = 0;
static MultiXactOffset set_mxoff = (MultiXactOffset) -1;
--- 64,71 ----
static const char *progname;
static uint32 set_xid_epoch = (uint32) -1;
static TransactionId set_xid = 0;
! static TransactionId set_oldest_commit_ts_xid = 0;
! static TransactionId set_newest_commit_ts_xid = 0;
static Oid set_oid = 0;
static MultiXactId set_mxid = 0;
static MultiXactOffset set_mxoff = (MultiXactOffset) -1;
*************** main(int argc, char *argv[])
*** 164,177 ****
break;
case 'c':
! set_oldest_commit_ts = strtoul(optarg, &endptr, 0);
if (endptr == optarg || *endptr != ',')
{
fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-c");
fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
! set_newest_commit_ts = strtoul(endptr + 1, &endptr2, 0);
if (endptr2 == endptr + 1 || *endptr2 != '\0')
{
fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-c");
--- 164,177 ----
break;
case 'c':
! set_oldest_commit_ts_xid = strtoul(optarg, &endptr, 0);
if (endptr == optarg || *endptr != ',')
{
fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-c");
fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
! set_newest_commit_ts_xid = strtoul(endptr + 1, &endptr2, 0);
if (endptr2 == endptr + 1 || *endptr2 != '\0')
{
fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-c");
*************** main(int argc, char *argv[])
*** 179,193 ****
exit(1);
}
! if (set_oldest_commit_ts < 2 &&
! set_oldest_commit_ts != 0)
{
fprintf(stderr, _("%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"), progname);
exit(1);
}
! if (set_newest_commit_ts < 2 &&
! set_newest_commit_ts != 0)
{
fprintf(stderr, _("%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"), progname);
exit(1);
--- 179,193 ----
exit(1);
}
! if (set_oldest_commit_ts_xid < 2 &&
! set_oldest_commit_ts_xid != 0)
{
fprintf(stderr, _("%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"), progname);
exit(1);
}
! if (set_newest_commit_ts_xid < 2 &&
! set_newest_commit_ts_xid != 0)
{
fprintf(stderr, _("%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"), progname);
exit(1);
*************** main(int argc, char *argv[])
*** 383,392 ****
ControlFile.checkPointCopy.oldestXidDB = InvalidOid;
}
! if (set_oldest_commit_ts != 0)
! ControlFile.checkPointCopy.oldestCommitTs = set_oldest_commit_ts;
! if (set_newest_commit_ts != 0)
! ControlFile.checkPointCopy.newestCommitTs = set_newest_commit_ts;
if (set_oid != 0)
ControlFile.checkPointCopy.nextOid = set_oid;
--- 383,392 ----
ControlFile.checkPointCopy.oldestXidDB = InvalidOid;
}
! if (set_oldest_commit_ts_xid != 0)
! ControlFile.checkPointCopy.oldestCommitTsXid = set_oldest_commit_ts_xid;
! if (set_newest_commit_ts_xid != 0)
! ControlFile.checkPointCopy.newestCommitTsXid = set_newest_commit_ts_xid;
if (set_oid != 0)
ControlFile.checkPointCopy.nextOid = set_oid;
*************** PrintControlValues(bool guessed)
*** 665,674 ****
ControlFile.checkPointCopy.oldestMulti);
printf(_("Latest checkpoint's oldestMulti's DB: %u\n"),
ControlFile.checkPointCopy.oldestMultiDB);
! printf(_("Latest checkpoint's oldestCommitTs: %u\n"),
! ControlFile.checkPointCopy.oldestCommitTs);
! printf(_("Latest checkpoint's newestCommitTs: %u\n"),
! ControlFile.checkPointCopy.newestCommitTs);
printf(_("Maximum data alignment: %u\n"),
ControlFile.maxAlign);
/* we don't print floatFormat since can't say much useful about it */
--- 665,674 ----
ControlFile.checkPointCopy.oldestMulti);
printf(_("Latest checkpoint's oldestMulti's DB: %u\n"),
ControlFile.checkPointCopy.oldestMultiDB);
! printf(_("Latest checkpoint's oldestCommitTsXid:%u\n"),
! ControlFile.checkPointCopy.oldestCommitTsXid);
! printf(_("Latest checkpoint's newestCommitTsXid:%u\n"),
! ControlFile.checkPointCopy.newestCommitTsXid);
printf(_("Maximum data alignment: %u\n"),
ControlFile.maxAlign);
/* we don't print floatFormat since can't say much useful about it */
*************** PrintNewControlValues()
*** 751,765 ****
ControlFile.checkPointCopy.nextXidEpoch);
}
! if (set_oldest_commit_ts != 0)
{
! printf(_("oldestCommitTs: %u\n"),
! ControlFile.checkPointCopy.oldestCommitTs);
}
! if (set_newest_commit_ts != 0)
{
! printf(_("newestCommitTs: %u\n"),
! ControlFile.checkPointCopy.newestCommitTs);
}
}
--- 751,765 ----
ControlFile.checkPointCopy.nextXidEpoch);
}
! if (set_oldest_commit_ts_xid != 0)
{
! printf(_("oldestCommitTsXid: %u\n"),
! ControlFile.checkPointCopy.oldestCommitTsXid);
}
! if (set_newest_commit_ts_xid != 0)
{
! printf(_("newestCommitTsXid: %u\n"),
! ControlFile.checkPointCopy.newestCommitTsXid);
}
}
diff --git a/src/include/access/commit_ts.h b/src/include/access/commit_ts.h
index 425f258..b11715a 100644
*** a/src/include/access/commit_ts.h
--- b/src/include/access/commit_ts.h
*************** extern void ExtendCommitTs(TransactionId
*** 43,49 ****
extern void TruncateCommitTs(TransactionId oldestXact);
extern void SetCommitTsLimit(TransactionId oldestXact,
TransactionId newestXact);
! extern void AdvanceOldestCommitTs(TransactionId oldestXact);
/* XLOG stuff */
#define COMMIT_TS_ZEROPAGE 0x00
--- 43,49 ----
extern void TruncateCommitTs(TransactionId oldestXact);
extern void SetCommitTsLimit(TransactionId oldestXact,
TransactionId newestXact);
! extern void AdvanceOldestCommitTsXid(TransactionId oldestXact);
/* XLOG stuff */
#define COMMIT_TS_ZEROPAGE 0x00
diff --git a/src/include/access/transam.h b/src/include/access/transam.h
index 96b3fac..9ad5761 100644
*** a/src/include/access/transam.h
--- b/src/include/access/transam.h
*************** typedef struct VariableCacheData
*** 126,133 ****
/*
* These fields are protected by CommitTsLock
*/
! TransactionId oldestCommitTs;
! TransactionId newestCommitTs;
/*
* These fields are protected by ProcArrayLock.
--- 126,133 ----
/*
* These fields are protected by CommitTsLock
*/
! TransactionId oldestCommitTsXid;
! TransactionId newestCommitTsXid;
/*
* These fields are protected by ProcArrayLock.
diff --git a/src/include/catalog/pg_control.h b/src/include/catalog/pg_control.h
index ad1eb4b..0b8bea7 100644
*** a/src/include/catalog/pg_control.h
--- b/src/include/catalog/pg_control.h
*************** typedef struct CheckPoint
*** 46,54 ****
MultiXactId oldestMulti; /* cluster-wide minimum datminmxid */
Oid oldestMultiDB; /* database with minimum datminmxid */
pg_time_t time; /* time stamp of checkpoint */
! TransactionId oldestCommitTs; /* oldest Xid with valid commit
* timestamp */
! TransactionId newestCommitTs; /* newest Xid with valid commit
* timestamp */
/*
--- 46,54 ----
MultiXactId oldestMulti; /* cluster-wide minimum datminmxid */
Oid oldestMultiDB; /* database with minimum datminmxid */
pg_time_t time; /* time stamp of checkpoint */
! TransactionId oldestCommitTsXid; /* oldest Xid with valid commit
* timestamp */
! TransactionId newestCommitTsXid; /* newest Xid with valid commit
* timestamp */
/*
Joe Conway <mail@joeconway.com> writes:
I retract my earlier suggestion of doing HEAD different from
REL9_5_STABLE, at least for the moment. My patch for pg_controldata
related functions is going to impact all this anyway, so we might as
well not fuss about it now.
Seems reasonable.
Any objections to the attached?
Looks OK in a quick once-over.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 12/28/2015 11:48 AM, Tom Lane wrote:
Joe Conway <mail@joeconway.com> writes:
I retract my earlier suggestion of doing HEAD different from
REL9_5_STABLE, at least for the moment. My patch for pg_controldata
related functions is going to impact all this anyway, so we might as
well not fuss about it now.Seems reasonable.
Any objections to the attached?
Looks OK in a quick once-over.
Pushed to HEAD and 9.5
Joe
--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development