Commit 7418767
committed
In pg_dump, don't dump a stats object unless dumping underlying table.
If the underlying table isn't being dumped, it's useless to dump
an extended statistics object; it'll just cause errors at restore.
We have always applied similar policies to, say, indexes.
(When and if we get cross-table stats objects, it might be profitable
to think a little harder about what to do with them. But for now
there seems no point in considering a stats object as anything but
an appendage of its table.)
Rian McGuire and Tom Lane, per report from Rian McGuire.
Back-patch to supported branches.
Discussion: https://postgr.es/m/7075d3aa-3f05-44a5-b68f-47dc6a8a0550@buildkite.com1 parent 541e8f1 commit 7418767
3 files changed
+32
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2046 | 2046 | | |
2047 | 2047 | | |
2048 | 2048 | | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
2049 | 2069 | | |
2050 | 2070 | | |
2051 | 2071 | | |
| |||
7291 | 7311 | | |
7292 | 7312 | | |
7293 | 7313 | | |
| 7314 | + | |
7294 | 7315 | | |
7295 | 7316 | | |
7296 | 7317 | | |
| |||
7302 | 7323 | | |
7303 | 7324 | | |
7304 | 7325 | | |
7305 | | - | |
| 7326 | + | |
7306 | 7327 | | |
7307 | 7328 | | |
7308 | 7329 | | |
7309 | | - | |
| 7330 | + | |
7310 | 7331 | | |
7311 | 7332 | | |
7312 | 7333 | | |
| |||
7318 | 7339 | | |
7319 | 7340 | | |
7320 | 7341 | | |
| 7342 | + | |
7321 | 7343 | | |
7322 | 7344 | | |
7323 | 7345 | | |
| |||
7332 | 7354 | | |
7333 | 7355 | | |
7334 | 7356 | | |
| 7357 | + | |
| 7358 | + | |
7335 | 7359 | | |
7336 | 7360 | | |
7337 | 7361 | | |
7338 | | - | |
| 7362 | + | |
7339 | 7363 | | |
7340 | 7364 | | |
7341 | 7365 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
423 | 423 | | |
424 | 424 | | |
425 | 425 | | |
426 | | - | |
| 426 | + | |
| 427 | + | |
427 | 428 | | |
428 | 429 | | |
429 | 430 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3742 | 3742 | | |
3743 | 3743 | | |
3744 | 3744 | | |
3745 | | - | |
| 3745 | + | |
3746 | 3746 | | |
3747 | | - | |
| 3747 | + | |
3748 | 3748 | | |
3749 | 3749 | | |
3750 | 3750 | | |
3751 | 3751 | | |
3752 | 3752 | | |
| 3753 | + | |
3753 | 3754 | | |
3754 | 3755 | | |
3755 | 3756 | | |
| |||
0 commit comments