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
8a59f336
Commit
8a59f336
authored
Jul 19, 2001
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor performance improvement in MultiRecordFreeSpace.
parent
7d4d5c00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
src/backend/storage/freespace/freespace.c
src/backend/storage/freespace/freespace.c
+16
-2
No files found.
src/backend/storage/freespace/freespace.c
View file @
8a59f336
...
@@ -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
* $Header: /cvsroot/pgsql/src/backend/storage/freespace/freespace.c,v 1.
3 2001/07/02 20:50:46
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/freespace/freespace.c,v 1.
4 2001/07/19 21:25:37
tgl Exp $
*
*
*
*
* NOTES:
* NOTES:
...
@@ -419,9 +419,23 @@ MultiRecordFreeSpace(RelFileNode *rel,
...
@@ -419,9 +419,23 @@ MultiRecordFreeSpace(RelFileNode *rel,
*
*
* XXX we could probably be smarter about this than doing it
* XXX we could probably be smarter about this than doing it
* completely separately for each one. FIXME later.
* completely separately for each one. FIXME later.
*
* One thing we can do is short-circuit the process entirely if
* a page (a) has too little free space to be recorded, and (b)
* is within the minPage..maxPage range --- then we deleted any
* old entry above, and we aren't going to make a new one.
* This is particularly useful since in most cases, all the passed
* pages will in fact be in the minPage..maxPage range.
*/
*/
for
(
i
=
0
;
i
<
nPages
;
i
++
)
for
(
i
=
0
;
i
<
nPages
;
i
++
)
fsm_record_free_space
(
fsmrel
,
pages
[
i
],
spaceAvail
[
i
]);
{
BlockNumber
page
=
pages
[
i
];
Size
avail
=
spaceAvail
[
i
];
if
(
avail
>=
fsmrel
->
threshold
||
page
<
minPage
||
page
>
maxPage
)
fsm_record_free_space
(
fsmrel
,
page
,
avail
);
}
}
}
SpinRelease
(
FreeSpaceLock
);
SpinRelease
(
FreeSpaceLock
);
}
}
...
...
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