forked from postgres/postgres
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit 7dbc7ba
Use attnum to identify index columns in pg_restore_attribute_stats().
yb conflict resolutions:
- doc/src/sgml/func.sgml
Only changes that were not conflicting were picked.
- src/backend/statistics/attribute_stats.c
Previous cherry-pick eea554f imported the latest version of this file already.
- src/test/regress/expected/stats_import.out
File was cherry-picked as part of eea554f which is a higher version. The contents of the file have been updated to match the state as of 40e27d0.
The following changes had to be made:
diff <(git show HEAD:src/test/regress/expected/stats_import.out) <(git show 40e27d0:src/test/regress/expected/stats_import.out)
< ERROR: invalid input syntax for type integer: "four"
---
> WARNING: invalid input syntax for type integer: "four"
> pg_restore_attribute_stats
> ----------------------------
> f
> (1 row)
>
458c463
< stats_import | test | id | f | 0.8 | 9 | -0.9 | | | | | | | | | |
---
> stats_import | test | id | f | 0.9 | 10 | -0.4 | | | | | | | | | |
Cause: Missing ccff2d2: Some ERRORs were converted to softer WARNINGS.
Resolution: yb-pg15 does not contain such soft warning errors.
- src/test/regress/sql/stats_import.sql
File was cherry-picked as part of eea554f which is a higher version. The contents of the entire file have been updated to match the state as of 40e27d0.
Previously we used attname for both table and index columns, but
that is problematic for indexes because their attnames are assigned
by internal rules that don't guarantee to preserve the names across
dump and reload. (This is what's causing the remaining buildfarm
failures in cross-version-upgrade tests.) Fortunately we can use
attnum instead, since there's no such thing as adding or dropping
columns in an existing index. We met this same problem previously
with ALTER INDEX ... SET STATISTICS, and solved it the same way,
cf commit 5b6d13e.
In pg_restore_attribute_stats() itself, we accept either attnum or
attname, but the policy used by pg_dump is to always use attname
for tables and attnum for indexes.
Author: Tom Lane <tgl@sss.pgh.pa.us>
Author: Corey Huinker <corey.huinker@gmail.com>
Discussion: https://postgr.es/m/1457469.1740419458@sss.pgh.pa.us
(cherry picked from commit 40e27d0)1 parent ca333f9 commit 7dbc7baCopy full SHA for 7dbc7ba
File tree
Expand file treeCollapse file tree
6 files changed
+973
-564
lines changedFilter options
- src
- bin/pg_dump
- t
- test
- perl/PostgreSQL/Test
- regress
- expected
- sql
Expand file treeCollapse file tree
6 files changed
+973
-564
lines changed
0 commit comments