Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
87f830e0
Commit
87f830e0
authored
Jul 21, 2014
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust cutoff points in newly-added sanity tests.
Per recommendation from Andres.
parent
78db307b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
src/backend/commands/vacuum.c
src/backend/commands/vacuum.c
+15
-7
No files found.
src/backend/commands/vacuum.c
View file @
87f830e0
...
...
@@ -745,13 +745,13 @@ vac_update_relstats(Relation relation,
* which case we don't want to forget the work it already did. However,
* if the stored relfrozenxid is "in the future", then it must be corrupt
* and it seems best to overwrite it with the cutoff we used this time.
*
See vac_update_datfrozenxid() concerning what we consider to be "in the
* future".
*
This should match vac_update_datfrozenxid() concerning what we consider
*
to be "in the
future".
*/
if
(
TransactionIdIsNormal
(
frozenxid
)
&&
pgcform
->
relfrozenxid
!=
frozenxid
&&
(
TransactionIdPrecedes
(
pgcform
->
relfrozenxid
,
frozenxid
)
||
TransactionIdPrecedes
(
GetOldestXmin
(
NULL
,
true
),
TransactionIdPrecedes
(
ReadNewTransactionId
(
),
pgcform
->
relfrozenxid
)))
{
pgcform
->
relfrozenxid
=
frozenxid
;
...
...
@@ -762,7 +762,7 @@ vac_update_relstats(Relation relation,
if
(
MultiXactIdIsValid
(
minmulti
)
&&
pgcform
->
relminmxid
!=
minmulti
&&
(
MultiXactIdPrecedes
(
pgcform
->
relminmxid
,
minmulti
)
||
MultiXactIdPrecedes
(
GetOldes
tMultiXactId
(),
pgcform
->
relminmxid
)))
MultiXactIdPrecedes
(
ReadNex
tMultiXactId
(),
pgcform
->
relminmxid
)))
{
pgcform
->
relminmxid
=
minmulti
;
dirty
=
true
;
...
...
@@ -803,8 +803,8 @@ vac_update_datfrozenxid(void)
SysScanDesc
scan
;
HeapTuple
classTup
;
TransactionId
newFrozenXid
;
TransactionId
lastSaneFrozenXid
;
MultiXactId
newMinMulti
;
TransactionId
lastSaneFrozenXid
;
MultiXactId
lastSaneMinMulti
;
bool
bogus
=
false
;
bool
dirty
=
false
;
...
...
@@ -815,13 +815,21 @@ vac_update_datfrozenxid(void)
* committed pg_class entries for new tables; see AddNewRelationTuple().
* So we cannot produce a wrong minimum by starting with this.
*/
newFrozenXid
=
lastSaneFrozenXid
=
GetOldestXmin
(
NULL
,
true
);
newFrozenXid
=
GetOldestXmin
(
NULL
,
true
);
/*
* Similarly, initialize the MultiXact "min" with the value that would be
* used on pg_class for new tables. See AddNewRelationTuple().
*/
newMinMulti
=
lastSaneMinMulti
=
GetOldestMultiXactId
();
newMinMulti
=
GetOldestMultiXactId
();
/*
* Identify the latest relfrozenxid and relminmxid values that we could
* validly see during the scan. These are conservative values, but it's
* not really worth trying to be more exact.
*/
lastSaneFrozenXid
=
ReadNewTransactionId
();
lastSaneMinMulti
=
ReadNextMultiXactId
();
/*
* We must seqscan pg_class to find the minimum Xid, because there is no
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment