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
89f373bf
Commit
89f373bf
authored
Oct 06, 2008
by
Heikki Linnakangas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Index FSMs needs to be vacuumed as well. Report by Jeff Davis.
parent
557faa4f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
7 deletions
+25
-7
src/backend/access/gin/ginvacuum.c
src/backend/access/gin/ginvacuum.c
+4
-1
src/backend/access/gist/gistvacuum.c
src/backend/access/gist/gistvacuum.c
+4
-1
src/backend/access/nbtree/nbtree.c
src/backend/access/nbtree/nbtree.c
+4
-1
src/backend/storage/freespace/indexfsm.c
src/backend/storage/freespace/indexfsm.c
+10
-1
src/include/storage/indexfsm.h
src/include/storage/indexfsm.h
+3
-3
No files found.
src/backend/access/gin/ginvacuum.c
View file @
89f373bf
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,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/access/gin/ginvacuum.c,v 1.2
2 2008/09/30 10:52:10
heikki Exp $
* $PostgreSQL: pgsql/src/backend/access/gin/ginvacuum.c,v 1.2
3 2008/10/06 08:04:11
heikki Exp $
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -744,6 +744,9 @@ ginvacuumcleanup(PG_FUNCTION_ARGS)
...
@@ -744,6 +744,9 @@ ginvacuumcleanup(PG_FUNCTION_ARGS)
totFreePages
=
totFreePages
-
stats
->
pages_removed
;
totFreePages
=
totFreePages
-
stats
->
pages_removed
;
}
}
/* Finally, vacuum the FSM */
IndexFreeSpaceMapVacuum
(
info
->
index
);
stats
->
pages_free
=
totFreePages
;
stats
->
pages_free
=
totFreePages
;
if
(
needLock
)
if
(
needLock
)
...
...
src/backend/access/gist/gistvacuum.c
View file @
89f373bf
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,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/access/gist/gistvacuum.c,v 1.3
7 2008/09/30 10:52:10
heikki Exp $
* $PostgreSQL: pgsql/src/backend/access/gist/gistvacuum.c,v 1.3
8 2008/10/06 08:04:11
heikki Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -619,6 +619,9 @@ gistvacuumcleanup(PG_FUNCTION_ARGS)
...
@@ -619,6 +619,9 @@ gistvacuumcleanup(PG_FUNCTION_ARGS)
totFreePages
=
totFreePages
-
stats
->
std
.
pages_removed
;
totFreePages
=
totFreePages
-
stats
->
std
.
pages_removed
;
}
}
/* Finally, vacuum the FSM */
IndexFreeSpaceMapVacuum
(
info
->
index
);
/* return statistics */
/* return statistics */
stats
->
std
.
pages_free
=
totFreePages
;
stats
->
std
.
pages_free
=
totFreePages
;
if
(
needLock
)
if
(
needLock
)
...
...
src/backend/access/nbtree/nbtree.c
View file @
89f373bf
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,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/access/nbtree/nbtree.c,v 1.16
2 2008/09/30 10:52:10
heikki Exp $
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtree.c,v 1.16
3 2008/10/06 08:04:11
heikki Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -574,6 +574,9 @@ btvacuumcleanup(PG_FUNCTION_ARGS)
...
@@ -574,6 +574,9 @@ btvacuumcleanup(PG_FUNCTION_ARGS)
btvacuumscan
(
info
,
stats
,
NULL
,
NULL
,
0
);
btvacuumscan
(
info
,
stats
,
NULL
,
NULL
,
0
);
}
}
/* Finally, vacuum the FSM */
IndexFreeSpaceMapVacuum
(
info
->
index
);
/*
/*
* During a non-FULL vacuum it's quite possible for us to be fooled by
* During a non-FULL vacuum it's quite possible for us to be fooled by
* concurrent page splits into double-counting some index tuples, so
* concurrent page splits into double-counting some index tuples, so
...
...
src/backend/storage/freespace/indexfsm.c
View file @
89f373bf
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,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/storage/freespace/indexfsm.c,v 1.
1 2008/09/30 10:52:13
heikki Exp $
* $PostgreSQL: pgsql/src/backend/storage/freespace/indexfsm.c,v 1.
2 2008/10/06 08:04:11
heikki Exp $
*
*
*
*
* NOTES:
* NOTES:
...
@@ -90,3 +90,12 @@ IndexFreeSpaceMapTruncate(Relation rel, BlockNumber nblocks)
...
@@ -90,3 +90,12 @@ IndexFreeSpaceMapTruncate(Relation rel, BlockNumber nblocks)
{
{
FreeSpaceMapTruncateRel
(
rel
,
nblocks
);
FreeSpaceMapTruncateRel
(
rel
,
nblocks
);
}
}
/*
* IndexFreeSpaceMapVacuum - scan and fix any inconsistencies in the FSM
*/
void
IndexFreeSpaceMapVacuum
(
Relation
rel
)
{
FreeSpaceMapVacuum
(
rel
);
}
src/include/storage/indexfsm.h
View file @
89f373bf
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1996-2008, 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/storage/indexfsm.h,v 1.
1 2008/09/30 10:52:14
heikki Exp $
* $PostgreSQL: pgsql/src/include/storage/indexfsm.h,v 1.
2 2008/10/06 08:04:11
heikki Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -16,12 +16,12 @@
...
@@ -16,12 +16,12 @@
#include "utils/rel.h"
#include "utils/rel.h"
extern
void
InitIndexFreeSpaceMap
(
Relation
rel
);
extern
BlockNumber
GetFreeIndexPage
(
Relation
rel
);
extern
BlockNumber
GetFreeIndexPage
(
Relation
rel
);
extern
void
RecordFreeIndexPage
(
Relation
rel
,
BlockNumber
page
);
extern
void
RecordFreeIndexPage
(
Relation
rel
,
BlockNumber
page
);
extern
void
RecordUsedIndexPage
(
Relation
rel
,
BlockNumber
page
);
extern
void
RecordUsedIndexPage
(
Relation
rel
,
BlockNumber
page
);
extern
void
InitIndexFreeSpaceMap
(
Relation
rel
);
extern
void
IndexFreeSpaceMapTruncate
(
Relation
rel
,
BlockNumber
nblocks
);
extern
void
IndexFreeSpaceMapTruncate
(
Relation
rel
,
BlockNumber
nblocks
);
extern
void
IndexFreeSpaceMapVacuum
(
Relation
rel
);
#endif
/* INDEXFSM_H */
#endif
/* INDEXFSM_H */
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