Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit29d108c

Browse files
author
Amit Kapila
committed
Doc: Update the documentation for FSM behavior for small tables.
In commitb0eaa4c, we have avoided the creation of FSM for small tables.So the functions that use FSM to compute the free space can return zero forsuch tables. This was previously also possible for the cases where thevacuum has not been triggered to update FSM.This commit updates the comments in code and documentation to reflect thisbehavior.Author: John NaylorReviewed-by: Amit KapilaDiscussion:https://postgr.es/m/CACPNZCtba-3m1q3A8gxA_vxg=T7gQf7gMbpR4Ciy5LntY-j+0Q@mail.gmail.com
1 parent41531e4 commit29d108c

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

‎contrib/pgstattuple/pgstatapprox.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ statapprox_heap(Relation rel, output_type *stat)
8989
/*
9090
* If the page has only visible tuples, then we can find out the free
9191
* space from the FSM and move on.
92+
*
93+
* Note: If a relation has no FSM, GetRecordedFreeSpace() will report
94+
* zero free space. This is fine for the purposes of approximation.
9295
*/
9396
if (VM_ALL_VISIBLE(rel,blkno,&vmbuffer))
9497
{

‎doc/src/sgml/pgfreespacemap.sgml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161
The values stored in the free space map are not exact. They're rounded
6262
to precision of 1/256th of <symbol>BLCKSZ</symbol> (32 bytes with default <symbol>BLCKSZ</symbol>), and
6363
they're not kept fully up-to-date as tuples are inserted and updated.
64+
In addition, small tables don't have a free space map, so these functions
65+
will return zero even if free space is available.
6466
</para>
6567

6668
<para>

‎doc/src/sgml/pgstattuple.sgml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,9 @@ approx_free_percent | 2.09
527527
bit set, then it is assumed to contain no dead tuples). For such
528528
pages, it derives the free space value from the free space map, and
529529
assumes that the rest of the space on the page is taken up by live
530-
tuples.
530+
tuples. Small tables don't have a free space map, so in that case
531+
this function will report zero free space, likewise inflating the
532+
approximate tuple length.
531533
</para>
532534

533535
<para>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp