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
ceb438ed
Commit
ceb438ed
authored
Jul 30, 2002
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
This patch fixes one serious bug (runaway INSERT) and a few rare (and
hard to reproduce) error conditions. Manfred Koizar
parent
bf7d8e42
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
6 deletions
+18
-6
src/backend/access/heap/heapam.c
src/backend/access/heap/heapam.c
+16
-5
src/backend/utils/time/tqual.c
src/backend/utils/time/tqual.c
+2
-1
No files found.
src/backend/access/heap/heapam.c
View file @
ceb438ed
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.14
2 2002/07/20 05:16:56
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.14
3 2002/07/30 16:08:33
momjian Exp $
*
*
* INTERFACE ROUTINES
...
...
@@ -1123,11 +1123,14 @@ heap_insert(Relation relation, HeapTuple tup, CommandId cid)
CheckMaxObjectId
(
HeapTupleGetOid
(
tup
));
}
tup
->
t_data
->
t_infomask
&=
~
(
HEAP_XACT_MASK
);
HeapTupleHeaderSetXmin
(
tup
->
t_data
,
GetCurrentTransactionId
());
HeapTupleHeaderSetCmin
(
tup
->
t_data
,
cid
);
HeapTupleHeaderSetXmaxInvalid
(
tup
->
t_data
);
HeapTupleHeaderSetCmax
(
tup
->
t_data
,
FirstCommandId
);
tup
->
t_data
->
t_infomask
&=
~
(
HEAP_XACT_MASK
);
/*
* Do *not* set Cmax! This would overwrite Cmin.
*/
/* HeapTupleHeaderSetCmax(tup->t_data, FirstCommandId); */
tup
->
t_data
->
t_infomask
|=
HEAP_XMAX_INVALID
;
tup
->
t_tableOid
=
relation
->
rd_id
;
...
...
@@ -2147,7 +2150,11 @@ heap_xlog_delete(bool redo, XLogRecPtr lsn, XLogRecord *record)
if
(
redo
)
{
htup
->
t_infomask
&=
~
(
HEAP_XMAX_COMMITTED
|
/*
* On redo from WAL we cannot rely on a tqual-routine
* to have reset HEAP_MOVED.
*/
htup
->
t_infomask
&=
~
(
HEAP_MOVED
|
HEAP_XMAX_COMMITTED
|
HEAP_XMAX_INVALID
|
HEAP_MARKED_FOR_UPDATE
);
HeapTupleHeaderSetXmax
(
htup
,
record
->
xl_xid
);
HeapTupleHeaderSetCmax
(
htup
,
FirstCommandId
);
...
...
@@ -2320,7 +2327,11 @@ heap_xlog_update(bool redo, XLogRecPtr lsn, XLogRecord *record, bool move)
}
else
{
htup
->
t_infomask
&=
~
(
HEAP_XMAX_COMMITTED
|
/*
* On redo from WAL we cannot rely on a tqual-routine
* to have reset HEAP_MOVED.
*/
htup
->
t_infomask
&=
~
(
HEAP_MOVED
|
HEAP_XMAX_COMMITTED
|
HEAP_XMAX_INVALID
|
HEAP_MARKED_FOR_UPDATE
);
HeapTupleHeaderSetXmax
(
htup
,
record
->
xl_xid
);
HeapTupleHeaderSetCmax
(
htup
,
FirstCommandId
);
...
...
src/backend/utils/time/tqual.c
View file @
ceb438ed
...
...
@@ -16,7 +16,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.5
7 2002/07/20 04:57:1
3 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.5
8 2002/07/30 16:08:3
3 momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -83,6 +83,7 @@ HeapTupleSatisfiesItself(HeapTupleHeader tuple)
return
false
;
}
tuple
->
t_infomask
|=
HEAP_XMIN_COMMITTED
;
tuple
->
t_infomask
&=
~
HEAP_MOVED
;
}
}
else
if
(
tuple
->
t_infomask
&
HEAP_MOVED_IN
)
...
...
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