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
d8dbbc8c
Commit
d8dbbc8c
authored
Aug 28, 1998
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vacuum fix.
parent
a53ea467
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
23 deletions
+21
-23
src/backend/catalog/index.c
src/backend/catalog/index.c
+14
-10
src/backend/commands/vacuum.c
src/backend/commands/vacuum.c
+7
-13
No files found.
src/backend/catalog/index.c
View file @
d8dbbc8c
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.5
6 1998/08/28 03:36:25
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.5
7 1998/08/28 04:57:19
momjian Exp $
*
*
*
*
* INTERFACE ROUTINES
* INTERFACE ROUTINES
...
@@ -1267,6 +1267,7 @@ FormIndexDatum(int numberOfAttributes,
...
@@ -1267,6 +1267,7 @@ FormIndexDatum(int numberOfAttributes,
FuncIndexInfoPtr
fInfo
)
FuncIndexInfoPtr
fInfo
)
{
{
AttrNumber
i
;
AttrNumber
i
;
int
offset
;
bool
isNull
;
bool
isNull
;
/* ----------------
/* ----------------
...
@@ -1276,16 +1277,19 @@ FormIndexDatum(int numberOfAttributes,
...
@@ -1276,16 +1277,19 @@ FormIndexDatum(int numberOfAttributes,
* ----------------
* ----------------
*/
*/
for
(
i
=
0
;
i
<
numberOfAttributes
;
i
++
)
for
(
i
=
1
;
i
<=
numberOfAttributes
;
i
++
)
{
{
datum
[
i
]
=
PointerGetDatum
(
GetIndexValue
(
heapTuple
,
offset
=
AttrNumberGetAttrOffset
(
i
);
datum
[
offset
]
=
PointerGetDatum
(
GetIndexValue
(
heapTuple
,
heapDescriptor
,
heapDescriptor
,
i
,
offset
,
attributeNumber
,
attributeNumber
,
fInfo
,
fInfo
,
&
isNull
));
&
isNull
));
nullv
[
i
]
=
(
isNull
)
?
'n'
:
' '
;
nullv
[
offset
]
=
(
isNull
)
?
'n'
:
' '
;
}
}
}
}
...
...
src/backend/commands/vacuum.c
View file @
d8dbbc8c
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.7
7 1998/08/28 03:36:26
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.7
8 1998/08/28 04:57:21
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
#include "postgres.h"
#include "postgres.h"
#include "miscadmin.h"
#include "access/genam.h"
#include "access/genam.h"
#include "access/heapam.h"
#include "access/heapam.h"
#include "access/transam.h"
#include "access/transam.h"
...
@@ -189,8 +190,8 @@ vc_init()
...
@@ -189,8 +190,8 @@ vc_init()
if
((
fd
=
open
(
"pg_vlock"
,
O_CREAT
|
O_EXCL
,
0600
))
<
0
)
if
((
fd
=
open
(
"pg_vlock"
,
O_CREAT
|
O_EXCL
,
0600
))
<
0
)
{
{
elog
(
ERROR
,
"Can't create lock file. Is another vacuum cleaner running?
\n
\
elog
(
ERROR
,
"Can't create lock file. Is another vacuum cleaner running?
\n
\
\t
If not, you may remove the pg_vlock file in the
pgsql/data/base/your_db
\n
\
\t
If not, you may remove the pg_vlock file in the
%s
\n
\
\t
directory"
);
\t
directory"
,
DatabasePath
);
}
}
close
(
fd
);
close
(
fd
);
...
@@ -2202,11 +2203,10 @@ static void
...
@@ -2202,11 +2203,10 @@ static void
vc_mkindesc
(
Relation
onerel
,
int
nindices
,
Relation
*
Irel
,
IndDesc
**
Idesc
)
vc_mkindesc
(
Relation
onerel
,
int
nindices
,
Relation
*
Irel
,
IndDesc
**
Idesc
)
{
{
IndDesc
*
idcur
;
IndDesc
*
idcur
;
HeapTuple
tuple
,
cachetuple
;
HeapTuple
cachetuple
;
AttrNumber
*
attnumP
;
AttrNumber
*
attnumP
;
int
natts
;
int
natts
;
int
i
;
int
i
;
Buffer
buffer
;
*
Idesc
=
(
IndDesc
*
)
palloc
(
nindices
*
sizeof
(
IndDesc
));
*
Idesc
=
(
IndDesc
*
)
palloc
(
nindices
*
sizeof
(
IndDesc
));
...
@@ -2216,13 +2216,8 @@ vc_mkindesc(Relation onerel, int nindices, Relation *Irel, IndDesc **Idesc)
...
@@ -2216,13 +2216,8 @@ vc_mkindesc(Relation onerel, int nindices, Relation *Irel, IndDesc **Idesc)
ObjectIdGetDatum
(
RelationGetRelid
(
Irel
[
i
])),
ObjectIdGetDatum
(
RelationGetRelid
(
Irel
[
i
])),
0
,
0
,
0
);
0
,
0
,
0
);
Assert
(
cachetuple
);
Assert
(
cachetuple
);
/* we never free the copy we make, because Idesc needs it for later */
/* get the buffer cache tuple */
idcur
->
tform
=
(
IndexTupleForm
)
GETSTRUCT
(
cachetuple
);
tuple
=
heap_fetch
(
onerel
,
SnapshotNow
,
&
cachetuple
->
t_ctid
,
&
buffer
);
Assert
(
tuple
);
pfree
(
cachetuple
);
idcur
->
tform
=
(
IndexTupleForm
)
GETSTRUCT
(
tuple
);
for
(
attnumP
=
&
(
idcur
->
tform
->
indkey
[
0
]),
natts
=
0
;
for
(
attnumP
=
&
(
idcur
->
tform
->
indkey
[
0
]),
natts
=
0
;
*
attnumP
!=
InvalidAttrNumber
&&
natts
!=
INDEX_MAX_KEYS
;
*
attnumP
!=
InvalidAttrNumber
&&
natts
!=
INDEX_MAX_KEYS
;
attnumP
++
,
natts
++
);
attnumP
++
,
natts
++
);
...
@@ -2238,7 +2233,6 @@ vc_mkindesc(Relation onerel, int nindices, Relation *Irel, IndDesc **Idesc)
...
@@ -2238,7 +2233,6 @@ vc_mkindesc(Relation onerel, int nindices, Relation *Irel, IndDesc **Idesc)
idcur
->
finfoP
=
(
FuncIndexInfo
*
)
NULL
;
idcur
->
finfoP
=
(
FuncIndexInfo
*
)
NULL
;
idcur
->
natts
=
natts
;
idcur
->
natts
=
natts
;
ReleaseBuffer
(
buffer
);
}
}
}
/* vc_mkindesc */
}
/* vc_mkindesc */
...
...
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