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
dfc90285
Commit
dfc90285
authored
Feb 08, 2010
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add C comments that HEAP_MOVED_* define usage is only for pre-9.0 binary
upgrades.
parent
3ab41f02
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
+21
-5
src/backend/utils/time/tqual.c
src/backend/utils/time/tqual.c
+16
-2
src/include/access/htup.h
src/include/access/htup.h
+5
-3
No files found.
src/backend/utils/time/tqual.c
View file @
dfc90285
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/time/tqual.c,v 1.11
6 2010/02/08 04:33:54 tgl
Exp $
* $PostgreSQL: pgsql/src/backend/utils/time/tqual.c,v 1.11
7 2010/02/08 14:10:21 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -91,7 +91,7 @@ static bool XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot);
...
@@ -91,7 +91,7 @@ static bool XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot);
* code in heapam.c relies on that!)
* code in heapam.c relies on that!)
*
*
* Also, if we are cleaning up HEAP_MOVED_IN or HEAP_MOVED_OFF entries, then
* Also, if we are cleaning up HEAP_MOVED_IN or HEAP_MOVED_OFF entries, then
* we can always set the hint bits, since
old-style
VACUUM FULL always used
* we can always set the hint bits, since
pre-9.0
VACUUM FULL always used
* synchronous commits and didn't move tuples that weren't previously
* synchronous commits and didn't move tuples that weren't previously
* hinted. (This is not known by this subroutine, but is applied by its
* hinted. (This is not known by this subroutine, but is applied by its
* callers.) Note: old-style VACUUM FULL is gone, but we have to keep this
* callers.) Note: old-style VACUUM FULL is gone, but we have to keep this
...
@@ -167,6 +167,7 @@ HeapTupleSatisfiesSelf(HeapTupleHeader tuple, Snapshot snapshot, Buffer buffer)
...
@@ -167,6 +167,7 @@ HeapTupleSatisfiesSelf(HeapTupleHeader tuple, Snapshot snapshot, Buffer buffer)
if
(
tuple
->
t_infomask
&
HEAP_XMIN_INVALID
)
if
(
tuple
->
t_infomask
&
HEAP_XMIN_INVALID
)
return
false
;
return
false
;
/* Used by pre-9.0 binary upgrades */
if
(
tuple
->
t_infomask
&
HEAP_MOVED_OFF
)
if
(
tuple
->
t_infomask
&
HEAP_MOVED_OFF
)
{
{
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
...
@@ -185,6 +186,7 @@ HeapTupleSatisfiesSelf(HeapTupleHeader tuple, Snapshot snapshot, Buffer buffer)
...
@@ -185,6 +186,7 @@ HeapTupleSatisfiesSelf(HeapTupleHeader tuple, Snapshot snapshot, Buffer buffer)
InvalidTransactionId
);
InvalidTransactionId
);
}
}
}
}
/* Used by pre-9.0 binary upgrades */
else
if
(
tuple
->
t_infomask
&
HEAP_MOVED_IN
)
else
if
(
tuple
->
t_infomask
&
HEAP_MOVED_IN
)
{
{
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
...
@@ -338,6 +340,7 @@ HeapTupleSatisfiesNow(HeapTupleHeader tuple, Snapshot snapshot, Buffer buffer)
...
@@ -338,6 +340,7 @@ HeapTupleSatisfiesNow(HeapTupleHeader tuple, Snapshot snapshot, Buffer buffer)
if
(
tuple
->
t_infomask
&
HEAP_XMIN_INVALID
)
if
(
tuple
->
t_infomask
&
HEAP_XMIN_INVALID
)
return
false
;
return
false
;
/* Used by pre-9.0 binary upgrades */
if
(
tuple
->
t_infomask
&
HEAP_MOVED_OFF
)
if
(
tuple
->
t_infomask
&
HEAP_MOVED_OFF
)
{
{
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
...
@@ -356,6 +359,7 @@ HeapTupleSatisfiesNow(HeapTupleHeader tuple, Snapshot snapshot, Buffer buffer)
...
@@ -356,6 +359,7 @@ HeapTupleSatisfiesNow(HeapTupleHeader tuple, Snapshot snapshot, Buffer buffer)
InvalidTransactionId
);
InvalidTransactionId
);
}
}
}
}
/* Used by pre-9.0 binary upgrades */
else
if
(
tuple
->
t_infomask
&
HEAP_MOVED_IN
)
else
if
(
tuple
->
t_infomask
&
HEAP_MOVED_IN
)
{
{
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
...
@@ -502,6 +506,7 @@ HeapTupleSatisfiesToast(HeapTupleHeader tuple, Snapshot snapshot,
...
@@ -502,6 +506,7 @@ HeapTupleSatisfiesToast(HeapTupleHeader tuple, Snapshot snapshot,
if
(
tuple
->
t_infomask
&
HEAP_XMIN_INVALID
)
if
(
tuple
->
t_infomask
&
HEAP_XMIN_INVALID
)
return
false
;
return
false
;
/* Used by pre-9.0 binary upgrades */
if
(
tuple
->
t_infomask
&
HEAP_MOVED_OFF
)
if
(
tuple
->
t_infomask
&
HEAP_MOVED_OFF
)
{
{
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
...
@@ -520,6 +525,7 @@ HeapTupleSatisfiesToast(HeapTupleHeader tuple, Snapshot snapshot,
...
@@ -520,6 +525,7 @@ HeapTupleSatisfiesToast(HeapTupleHeader tuple, Snapshot snapshot,
InvalidTransactionId
);
InvalidTransactionId
);
}
}
}
}
/* Used by pre-9.0 binary upgrades */
else
if
(
tuple
->
t_infomask
&
HEAP_MOVED_IN
)
else
if
(
tuple
->
t_infomask
&
HEAP_MOVED_IN
)
{
{
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
...
@@ -581,6 +587,7 @@ HeapTupleSatisfiesUpdate(HeapTupleHeader tuple, CommandId curcid,
...
@@ -581,6 +587,7 @@ HeapTupleSatisfiesUpdate(HeapTupleHeader tuple, CommandId curcid,
if
(
tuple
->
t_infomask
&
HEAP_XMIN_INVALID
)
if
(
tuple
->
t_infomask
&
HEAP_XMIN_INVALID
)
return
HeapTupleInvisible
;
return
HeapTupleInvisible
;
/* Used by pre-9.0 binary upgrades */
if
(
tuple
->
t_infomask
&
HEAP_MOVED_OFF
)
if
(
tuple
->
t_infomask
&
HEAP_MOVED_OFF
)
{
{
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
...
@@ -599,6 +606,7 @@ HeapTupleSatisfiesUpdate(HeapTupleHeader tuple, CommandId curcid,
...
@@ -599,6 +606,7 @@ HeapTupleSatisfiesUpdate(HeapTupleHeader tuple, CommandId curcid,
InvalidTransactionId
);
InvalidTransactionId
);
}
}
}
}
/* Used by pre-9.0 binary upgrades */
else
if
(
tuple
->
t_infomask
&
HEAP_MOVED_IN
)
else
if
(
tuple
->
t_infomask
&
HEAP_MOVED_IN
)
{
{
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
...
@@ -748,6 +756,7 @@ HeapTupleSatisfiesDirty(HeapTupleHeader tuple, Snapshot snapshot,
...
@@ -748,6 +756,7 @@ HeapTupleSatisfiesDirty(HeapTupleHeader tuple, Snapshot snapshot,
if
(
tuple
->
t_infomask
&
HEAP_XMIN_INVALID
)
if
(
tuple
->
t_infomask
&
HEAP_XMIN_INVALID
)
return
false
;
return
false
;
/* Used by pre-9.0 binary upgrades */
if
(
tuple
->
t_infomask
&
HEAP_MOVED_OFF
)
if
(
tuple
->
t_infomask
&
HEAP_MOVED_OFF
)
{
{
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
...
@@ -766,6 +775,7 @@ HeapTupleSatisfiesDirty(HeapTupleHeader tuple, Snapshot snapshot,
...
@@ -766,6 +775,7 @@ HeapTupleSatisfiesDirty(HeapTupleHeader tuple, Snapshot snapshot,
InvalidTransactionId
);
InvalidTransactionId
);
}
}
}
}
/* Used by pre-9.0 binary upgrades */
else
if
(
tuple
->
t_infomask
&
HEAP_MOVED_IN
)
else
if
(
tuple
->
t_infomask
&
HEAP_MOVED_IN
)
{
{
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
...
@@ -907,6 +917,7 @@ HeapTupleSatisfiesMVCC(HeapTupleHeader tuple, Snapshot snapshot,
...
@@ -907,6 +917,7 @@ HeapTupleSatisfiesMVCC(HeapTupleHeader tuple, Snapshot snapshot,
if
(
tuple
->
t_infomask
&
HEAP_XMIN_INVALID
)
if
(
tuple
->
t_infomask
&
HEAP_XMIN_INVALID
)
return
false
;
return
false
;
/* Used by pre-9.0 binary upgrades */
if
(
tuple
->
t_infomask
&
HEAP_MOVED_OFF
)
if
(
tuple
->
t_infomask
&
HEAP_MOVED_OFF
)
{
{
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
...
@@ -925,6 +936,7 @@ HeapTupleSatisfiesMVCC(HeapTupleHeader tuple, Snapshot snapshot,
...
@@ -925,6 +936,7 @@ HeapTupleSatisfiesMVCC(HeapTupleHeader tuple, Snapshot snapshot,
InvalidTransactionId
);
InvalidTransactionId
);
}
}
}
}
/* Used by pre-9.0 binary upgrades */
else
if
(
tuple
->
t_infomask
&
HEAP_MOVED_IN
)
else
if
(
tuple
->
t_infomask
&
HEAP_MOVED_IN
)
{
{
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
...
@@ -1066,6 +1078,7 @@ HeapTupleSatisfiesVacuum(HeapTupleHeader tuple, TransactionId OldestXmin,
...
@@ -1066,6 +1078,7 @@ HeapTupleSatisfiesVacuum(HeapTupleHeader tuple, TransactionId OldestXmin,
{
{
if
(
tuple
->
t_infomask
&
HEAP_XMIN_INVALID
)
if
(
tuple
->
t_infomask
&
HEAP_XMIN_INVALID
)
return
HEAPTUPLE_DEAD
;
return
HEAPTUPLE_DEAD
;
/* Used by pre-9.0 binary upgrades */
else
if
(
tuple
->
t_infomask
&
HEAP_MOVED_OFF
)
else
if
(
tuple
->
t_infomask
&
HEAP_MOVED_OFF
)
{
{
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
...
@@ -1083,6 +1096,7 @@ HeapTupleSatisfiesVacuum(HeapTupleHeader tuple, TransactionId OldestXmin,
...
@@ -1083,6 +1096,7 @@ HeapTupleSatisfiesVacuum(HeapTupleHeader tuple, TransactionId OldestXmin,
SetHintBits
(
tuple
,
buffer
,
HEAP_XMIN_COMMITTED
,
SetHintBits
(
tuple
,
buffer
,
HEAP_XMIN_COMMITTED
,
InvalidTransactionId
);
InvalidTransactionId
);
}
}
/* Used by pre-9.0 binary upgrades */
else
if
(
tuple
->
t_infomask
&
HEAP_MOVED_IN
)
else
if
(
tuple
->
t_infomask
&
HEAP_MOVED_IN
)
{
{
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
TransactionId
xvac
=
HeapTupleHeaderGetXvac
(
tuple
);
...
...
src/include/access/htup.h
View file @
dfc90285
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* $PostgreSQL: pgsql/src/include/access/htup.h,v 1.11
1 2010/02/08 04:33:54 tgl
Exp $
* $PostgreSQL: pgsql/src/include/access/htup.h,v 1.11
2 2010/02/08 14:10:21 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -176,9 +176,11 @@ typedef HeapTupleHeaderData *HeapTupleHeader;
...
@@ -176,9 +176,11 @@ typedef HeapTupleHeaderData *HeapTupleHeader;
#define HEAP_XMAX_IS_MULTI 0x1000
/* t_xmax is a MultiXactId */
#define HEAP_XMAX_IS_MULTI 0x1000
/* t_xmax is a MultiXactId */
#define HEAP_UPDATED 0x2000
/* this is UPDATEd version of row */
#define HEAP_UPDATED 0x2000
/* this is UPDATEd version of row */
#define HEAP_MOVED_OFF 0x4000
/* moved to another place by
#define HEAP_MOVED_OFF 0x4000
/* moved to another place by
* old-style VACUUM FULL */
* pre-9.0 VACUUM FULL; kept
* for binary upgrade support */
#define HEAP_MOVED_IN 0x8000
/* moved from another place by
#define HEAP_MOVED_IN 0x8000
/* moved from another place by
* old-style VACUUM FULL */
* pre-9.0 VACUUM FULL; kept
* for binary upgrade support */
#define HEAP_MOVED (HEAP_MOVED_OFF | HEAP_MOVED_IN)
#define HEAP_MOVED (HEAP_MOVED_OFF | HEAP_MOVED_IN)
#define HEAP_XACT_MASK 0xFFE0
/* visibility-related bits */
#define HEAP_XACT_MASK 0xFFE0
/* visibility-related bits */
...
...
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