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

Commitff49430

Browse files
committed
Fix datatype for number of heap tuples during last cleanup
It appears that new fields introduced in857f9c3 have inconsistent datatypes:BTMetaPageData.btm_last_cleanup_num_heap_tuples is of float4 type,while xl_btree_metadata.last_cleanup_num_heap_tuples is of double type.IndexVacuumInfo.num_heap_tuples, which is a source of values forboth former fields is of double type. So, make both those fields inBTMetaPageData and xl_btree_metadata use float8 type in order to match theprecision of the source. That shouldn't be double type, because we alwaysuse types with explicit width in WAL.Patch introduces incompatibility of on-disk format since857f9c3 commit, butthat versions never was released, so just bump catalog version to avoidpossible confusion.Author: Alexander Korortkov
1 parentf97f0c9 commitff49430

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

‎src/include/access/nbtree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ typedef struct BTMetaPageData
105105
/* following fields are available since page version 3 */
106106
TransactionIdbtm_oldest_btpo_xact;/* oldest btpo_xact among of
107107
* deleted pages */
108-
float4btm_last_cleanup_num_heap_tuples;/* number of heap tuples
108+
float8btm_last_cleanup_num_heap_tuples;/* number of heap tuples
109109
* during last cleanup */
110110
}BTMetaPageData;
111111

‎src/include/access/nbtxlog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ typedef struct xl_btree_metadata
5252
BlockNumberfastroot;
5353
uint32fastlevel;
5454
TransactionIdoldest_btpo_xact;
55-
doublelast_cleanup_num_heap_tuples;
55+
float8last_cleanup_num_heap_tuples;
5656
}xl_btree_metadata;
5757

5858
/*

‎src/include/catalog/catversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/*yyyymmddN */
56-
#defineCATALOG_VERSION_NO201804091
56+
#defineCATALOG_VERSION_NO201804191
5757

5858
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp