aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeRecursiveunion.c
diff options
context:
space:
mode:
authorAndrew Gierth <rhodiumtoad@postgresql.org>2017-03-16 22:28:03 +0000
committerAndrew Gierth <rhodiumtoad@postgresql.org>2017-03-16 22:28:03 +0000
commit1914c5ea7daaaaba4420f65c991256af5d4a9813 (patch)
tree8f1b43d5a9ad32c4bec24bf24263a026c6f1f490 /src/backend/executor/nodeRecursiveunion.c
parent80824ddda30154d56c9f40fe47dd1900d44ced32 (diff)
downloadpostgresql-1914c5ea7daaaaba4420f65c991256af5d4a9813.tar.gz
postgresql-1914c5ea7daaaaba4420f65c991256af5d4a9813.zip
Avoid having vacuum set reltuples to 0 on non-empty relations in the
presence of page pins, which leads to serious estimation errors in the planner. This particularly affects small heavily-accessed tables, especially where locking (e.g. from FK constraints) forces frequent vacuums for mxid cleanup. Fix by keeping separate track of pages whose live tuples were actually counted vs. pages that were only scanned for freezing purposes. Thus, reltuples can only be set to 0 if all pages of the relation were actually counted. Backpatch to all supported versions. Per bug #14057 from Nicolas Baccelli, analyzed by me. Discussion: https://postgr.es/m/20160331103739.8956.94469@wrigleys.postgresql.org
Diffstat (limited to 'src/backend/executor/nodeRecursiveunion.c')
0 files changed, 0 insertions, 0 deletions