forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitec28808
committed
Fix ginEntryInsert's counting of GIN leaf tuples.
As the code stands, nEntries counts the number of ginEntryInsert()calls, so that's what you end up with at the end of a GIN index build.However, ginvacuumcleanup() recomputes nEntries as the number ofsurviving leaf tuples, and that's generally consistent with the way thatgincostestimate() uses the value. So let's clearly define nEntriesas the number of leaf tuples, and therefore adjust ginEntryInsert() toincrement it only when we make a new one, not when we add TIDs into anexisting tuple or posting tree.In practice this inconsistency probably has little impact, so I don'tfeel a need to back-patch.Insung Moon and Keisuke KurodaDiscussion:https://postgr.es/m/CAEMmqBuH_O-oXL+3_ArQ6F5cJ7kXVow2SGQB3HRacku_T+xkmA@mail.gmail.com1 parenta63c84e commitec28808
1 file changed
+7
-4
lines changedLines changed: 7 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
190 | 190 |
| |
191 | 191 |
| |
192 | 192 |
| |
193 |
| - | |
194 |
| - | |
195 |
| - | |
196 |
| - | |
197 | 193 |
| |
198 | 194 |
| |
199 | 195 |
| |
| |||
234 | 230 |
| |
235 | 231 |
| |
236 | 232 |
| |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
237 | 240 |
| |
238 | 241 |
| |
239 | 242 |
| |
|
0 commit comments
Comments
(0)