summaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistutil.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-11-04 14:16:42 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2019-11-04 14:16:42 -0500
commitec28808ba85853fa14b090199236ca555273607e (patch)
tree2489f412c4ee651bdeb8c80d832655cafa92ab7b /src/backend/access/gist/gistutil.c
parenta63c84e59acf9f5e2b54aad4974a80e5075af646 (diff)
downloadpostgresql-ec28808ba85853fa14b090199236ca555273607e.tar.gz
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 of surviving leaf tuples, and that's generally consistent with the way that gincostestimate() uses the value. So let's clearly define nEntries as the number of leaf tuples, and therefore adjust ginEntryInsert() to increment it only when we make a new one, not when we add TIDs into an existing tuple or posting tree. In practice this inconsistency probably has little impact, so I don't feel a need to back-patch. Insung Moon and Keisuke Kuroda Discussion: https://postgr.es/m/CAEMmqBuH_O-oXL+3_ArQ6F5cJ7kXVow2SGQB3HRacku_T+xkmA@mail.gmail.com
Diffstat (limited to 'src/backend/access/gist/gistutil.c')
0 files changed, 0 insertions, 0 deletions