mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-01 22:51:16 +02:00
Fix datatype for number of heap tuples during last cleanup
It appears that new fields introduced in857f9c36
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 for both former fields is of double type. So, make both those fields in BTMetaPageData and xl_btree_metadata use float8 type in order to match the precision of the source. That shouldn't be double type, because we always use types with explicit width in WAL. Patch introduces incompatibility of on-disk format since857f9c36
commit, but that versions never was released, so just bump catalog version to avoid possible confusion. Author: Alexander Korortkov
This commit is contained in:
parent
f97f0c921a
commit
ff4943042f
@ -105,7 +105,7 @@ typedef struct BTMetaPageData
|
|||||||
/* following fields are available since page version 3 */
|
/* following fields are available since page version 3 */
|
||||||
TransactionId btm_oldest_btpo_xact; /* oldest btpo_xact among of
|
TransactionId btm_oldest_btpo_xact; /* oldest btpo_xact among of
|
||||||
* deleted pages */
|
* deleted pages */
|
||||||
float4 btm_last_cleanup_num_heap_tuples; /* number of heap tuples
|
float8 btm_last_cleanup_num_heap_tuples; /* number of heap tuples
|
||||||
* during last cleanup */
|
* during last cleanup */
|
||||||
} BTMetaPageData;
|
} BTMetaPageData;
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ typedef struct xl_btree_metadata
|
|||||||
BlockNumber fastroot;
|
BlockNumber fastroot;
|
||||||
uint32 fastlevel;
|
uint32 fastlevel;
|
||||||
TransactionId oldest_btpo_xact;
|
TransactionId oldest_btpo_xact;
|
||||||
double last_cleanup_num_heap_tuples;
|
float8 last_cleanup_num_heap_tuples;
|
||||||
} xl_btree_metadata;
|
} xl_btree_metadata;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -53,6 +53,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* yyyymmddN */
|
/* yyyymmddN */
|
||||||
#define CATALOG_VERSION_NO 201804091
|
#define CATALOG_VERSION_NO 201804191
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user