- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit7102070
committed
Don't lose partitioned table reltuples=0 after relhassubclass=f.
ANALYZE sets relhassubclass=f when a partitioned table no longer haspartitions. An ANALYZE doing that proceeded to apply the inplace updateof pg_class.reltuples to the old pg_class tuple instead of the newtuple, losing that reltuples=0 change if the ANALYZE committed.Non-partitioning inheritance trees were unaffected. Back-patch to v14,where commit375aed3 introducedmaintenance of partitioned table pg_class.reltuples.Reported by Alexander Lakhin.Discussion:https://postgr.es/m/a295b499-dcab-6a99-c06e-01cf60593344@gmail.com1 parent055891f commit7102070
File tree
3 files changed
+82
-1
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+82
-1
lines changedLines changed: 6 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
629 | 629 |
| |
630 | 630 |
| |
631 | 631 |
| |
632 |
| - | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
633 | 637 |
| |
634 | 638 |
| |
635 | 639 |
| |
| |||
664 | 668 |
| |
665 | 669 |
| |
666 | 670 |
| |
| 671 | + | |
667 | 672 |
| |
668 | 673 |
| |
669 | 674 |
| |
|
Lines changed: 47 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
82 | 82 |
| |
83 | 83 |
| |
84 | 84 |
| |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
85 | 132 |
| |
86 | 133 |
| |
87 | 134 |
| |
|
Lines changed: 29 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
67 | 67 |
| |
68 | 68 |
| |
69 | 69 |
| |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
70 | 99 |
| |
71 | 100 |
| |
72 | 101 |
| |
|
0 commit comments
Comments
(0)