Skip to content

2.27.0.0-b63

@hari90 hari90 tagged this 06 May 06:06
Summary:
Import 17 upstream Postgres commit from master related to the feature `Transfer statistics during pg_upgrade`.

f0d0083f52f994989b1bb6723e7bd0fad9f586cd | pg_dump: Fix query for gathering attribute stats on older versions. | 2025-04-04 21:05:30 -0500
9c02e3a986daa865ecdc2e3d8183e2d83b8f4824 | pg_dump: Retrieve attribute statistics in batches. | 2025-04-04 14:51:08 -0500
7d5c83b4e90c7156655f98b7312a30ae5eeb4d27 | pg_dump: Reduce memory usage of dumps with statistics. | 2025-04-04 14:51:08 -0500
a0a4601765b896079eb82a9d5cfa1f41154fcfdb | Matview statistics depend on matview data. | 2025-03-28 16:12:55 -0700
bde2fb797aaebcbe06bf60f330ba5a068f17dda7 | Add pg_dump --with-{schema|data|statistics} options. | 2025-03-25 17:36:38 -0700
650ab8aaf1957863ae14c80265e79f5d903b49fd | Stats: use schemaname/relname instead of regclass. | 2025-03-25 11:16:06 -0700
1852aea3f526b124b95585f7b1f655f3af04afd5 | Don't convert to and from floats in pg_dump. | 2025-03-08 11:25:36 -0800
d611f8b1587b8f30caa7c0da99ae5d28e914d54f | CREATE INDEX: don't update table stats if autovacuum=off. | 2025-03-06 19:36:34 2025 -0800
1d33de9d683722bfa14e436e30a8f5b999a4e2e7 | Organize and deduplicate statistics import tests. | 2025-03-06 00:19:22 2025 -0800
424ededc580b03e1bcf8aff18a735e519c80061f | Adjust pg_dump tag for relation stats. | 2025-02-27 20:42:12 -0800
40e27d04b4f643cfb78af8db42a1f2e700ec9876 | Use attnum to identify index columns in pg_restore_attribute_stats(). | 2025-02-26 16:36:20 -0500
6ee3b91bad269b8f1acee38607bd17923efd6e06 | pg_dump: prepare attribute stats query. | 2025-02-25 19:52:11 -0800
8f427187db78a549af316a69d54f5969db5f4951 | Avoid unnecessary relation stats query in pg_dump. | 2025-02-25 19:51:45 -0800
fc0d0ce978752493868496be6558fa17b7c4c3cf | Ignore hash's relallvisible when checking pg_upgrade from pre-v10. | 2025-02-23 14:16:26 2025 -0500
ab84d0ff806dd791ea9da5f1ca302daf3cf42980 | Trial fix for old cross-version upgrades. | Thu 2025-02-20 10:21:24 2025 -0800
1fd1bd871012732e3c6c482667d2f2c56f1a9395 | Transfer statistics during pg_upgrade. | 2025-02-20 01:29:06 -0800
41a284411e09a3c0a401cd5ab81fbf1802fe8021 | Clean up some pg_dump tests | Wed Oct 18 08:03:39 2023 +0200

 The following changes were applied on top of the imported merge commit:
- `yb.port.stats_import.sql`, and `yb.port.stats_import.out` were updated to match `stats_import.sql` and `stats_import.out` respectively.
- In PostgreSQL the default behavior is for both backups and pg_upgrade to dump/import stats.
    In YB the backup was modified to not dump stats by default; `pg_backup_archiver.c:194`
    pg_upgrade imports stats by default but new gflag `ysql_upgrade_import_stats` (default: false) was added to disable this behavior until it is fully tested.
- In PostgreSQL `range_empty_frac` , `range_length_histogram`, and `range_bounds_histogram` are not available in `pg_stats` view in versions below 17. These have been added to `yb_int_pg_stats_v11` in yb version 11. So `pg_dump.c` has changes required to use the yb view with these 3 columns.
- Upgrade script `V81__26240__pg_clear_relation_stats.sql` was added to handle the `pg_prog.dat` changes.

Feature is disabled until #27057 is addressed.
Jira: DB-15585

Test Plan:
 ybd --java-test 'org.yb.pgsql.TestPgRegressPgStatsImport#schedule'

ysql_major_upgrade_stats_import-test

Reviewers: telgersma, jason

Reviewed By: telgersma, jason

Subscribers: svc_phabricator, yql, ybase

Differential Revision: https://phorge.dev.yugabyte.com/D43204
Assets 2
Loading