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
c7cba578
Commit
c7cba578
authored
Nov 28, 1996
by
Vadim B. Mikheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for "might be used uninitialized" warnings.
parent
f0e7004d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
src/backend/commands/vacuum.c
src/backend/commands/vacuum.c
+11
-12
No files found.
src/backend/commands/vacuum.c
View file @
c7cba578
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.
9 1996/11/27 07:27:20
vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.
10 1996/11/28 04:37:38
vadim Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -245,7 +245,7 @@ _vc_getrels(Portal p, NameData *VacRelP)
...
@@ -245,7 +245,7 @@ _vc_getrels(Portal p, NameData *VacRelP)
}
}
portalmem
=
PortalGetVariableMemory
(
p
);
portalmem
=
PortalGetVariableMemory
(
p
);
vrl
=
(
VRelList
)
NULL
;
vrl
=
cur
=
(
VRelList
)
NULL
;
pgclass
=
heap_openr
(
RelationRelationName
);
pgclass
=
heap_openr
(
RelationRelationName
);
pgcdesc
=
RelationGetTupleDescriptor
(
pgclass
);
pgcdesc
=
RelationGetTupleDescriptor
(
pgclass
);
...
@@ -511,7 +511,6 @@ _vc_scanheap (VRelList curvrl, Relation onerel,
...
@@ -511,7 +511,6 @@ _vc_scanheap (VRelList curvrl, Relation onerel,
page
=
BufferGetPage
(
buf
);
page
=
BufferGetPage
(
buf
);
vpc
->
vpd_blkno
=
blkno
;
vpc
->
vpd_blkno
=
blkno
;
vpc
->
vpd_noff
=
0
;
vpc
->
vpd_noff
=
0
;
vpc
->
vpd_noff
=
0
;
if
(
PageIsNew
(
page
))
{
if
(
PageIsNew
(
page
))
{
elog
(
NOTICE
,
"Rel %.*s: Uninitialized page %u - fixing"
,
elog
(
NOTICE
,
"Rel %.*s: Uninitialized page %u - fixing"
,
...
@@ -734,19 +733,19 @@ _vc_rpfheap (VRelList curvrl, Relation onerel,
...
@@ -734,19 +733,19 @@ _vc_rpfheap (VRelList curvrl, Relation onerel,
{
{
TransactionId
myXID
;
TransactionId
myXID
;
CommandId
myCID
;
CommandId
myCID
;
AbsoluteTime
myCTM
;
AbsoluteTime
myCTM
=
0
;
Buffer
buf
,
ToBuf
;
Buffer
buf
,
ToBuf
;
int
nblocks
,
blkno
;
int
nblocks
,
blkno
;
Page
page
,
ToPage
;
Page
page
,
ToPage
=
NULL
;
OffsetNumber
offnum
,
maxoff
,
newoff
,
moff
;
OffsetNumber
offnum
=
0
,
maxoff
=
0
,
newoff
,
moff
;
ItemId
itemid
,
newitemid
;
ItemId
itemid
,
newitemid
;
HeapTuple
htup
,
newtup
;
HeapTuple
htup
,
newtup
;
TupleDesc
tupdesc
;
TupleDesc
tupdesc
=
NULL
;
Datum
*
idatum
;
Datum
*
idatum
=
NULL
;
char
*
inulls
;
char
*
inulls
=
NULL
;
InsertIndexResult
iresult
;
InsertIndexResult
iresult
;
VPageListData
Nvpl
;
VPageListData
Nvpl
;
VPageDescr
ToVpd
,
Fvplast
,
Vvplast
,
vpc
,
*
vpp
;
VPageDescr
ToVpd
=
NULL
,
Fvplast
,
Vvplast
,
vpc
,
*
vpp
;
IndDesc
*
Idesc
,
*
idcur
;
IndDesc
*
Idesc
,
*
idcur
;
int
Fblklast
,
Vblklast
,
i
;
int
Fblklast
,
Vblklast
,
i
;
Size
tlen
;
Size
tlen
;
...
@@ -803,7 +802,7 @@ _vc_rpfheap (VRelList curvrl, Relation onerel,
...
@@ -803,7 +802,7 @@ _vc_rpfheap (VRelList curvrl, Relation onerel,
nmoved
=
0
;
nmoved
=
0
;
vpc
=
(
VPageDescr
)
palloc
(
sizeof
(
VPageDescrData
)
+
MaxOffsetNumber
*
sizeof
(
OffsetNumber
));
vpc
=
(
VPageDescr
)
palloc
(
sizeof
(
VPageDescrData
)
+
MaxOffsetNumber
*
sizeof
(
OffsetNumber
));
vpc
->
vpd_nusd
=
0
;
vpc
->
vpd_nusd
=
vpc
->
vpd_noff
=
0
;
nblocks
=
curvrl
->
vrl_npages
;
nblocks
=
curvrl
->
vrl_npages
;
for
(
blkno
=
nblocks
-
Vvpl
->
vpl_nemend
-
1
;
;
blkno
--
)
for
(
blkno
=
nblocks
-
Vvpl
->
vpl_nemend
-
1
;
;
blkno
--
)
...
@@ -819,6 +818,7 @@ _vc_rpfheap (VRelList curvrl, Relation onerel,
...
@@ -819,6 +818,7 @@ _vc_rpfheap (VRelList curvrl, Relation onerel,
isempty
=
PageIsEmpty
(
page
);
isempty
=
PageIsEmpty
(
page
);
dowrite
=
false
;
if
(
blkno
==
Vblklast
)
/* it's reapped page */
if
(
blkno
==
Vblklast
)
/* it's reapped page */
{
{
if
(
Vvplast
->
vpd_noff
>
0
)
/* there are dead tuples */
if
(
Vvplast
->
vpd_noff
>
0
)
/* there are dead tuples */
...
@@ -851,7 +851,6 @@ _vc_rpfheap (VRelList curvrl, Relation onerel,
...
@@ -851,7 +851,6 @@ _vc_rpfheap (VRelList curvrl, Relation onerel,
else
else
{
{
Assert
(
!
isempty
);
Assert
(
!
isempty
);
dowrite
=
false
;
}
}
vpc
->
vpd_blkno
=
blkno
;
vpc
->
vpd_blkno
=
blkno
;
...
...
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