forked from greenplum-db/gpbackup-archive
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gpbackup incorrectly backups HyperLogLog statistics (#41)
Sometimes gprestore cannot restore such backup. This happens if HyperLogLog statistics were collected for a column whose type cannot be implicitly converted to text, for example INTEGER. In this case, gpbackup backups the binary representation of such statistics, converting them to a column type, which is incorrect, since HyperLogLog statistics are stored in a binary representation of the BYTEA type. (https://github.com/arenadata/gpdb/blob/030faa2e79cbeb42ab4c843f8c8475c322506990/src/backend/commands/analyze.c#L1284-L1305) This patch corrects the described issue by explicitly specifying the BYTEA type for HyperLogLog statistics. In the test, the leaf partition was excluded from checking the number of statistics, because the current version of gpbackup does not backup statistics for leaf partitions. Once this is corrected, this additional condition can be removed. (cherry picked from commit 85384fa)
- Loading branch information
Showing
2 changed files
with
41 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters