git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 055891f) | patch
Don't lose partitioned table reltuples=0 after relhassubclass=f.
2024年7月13日 15:09:33 +0000 (08:09 -0700)
2024年7月13日 15:09:33 +0000 (08:09 -0700)
commit 7102070329d8147246d2791321f9915c3b5abf31
Don't lose partitioned table reltuples=0 after relhassubclass=f.

ANALYZE sets relhassubclass=f when a partitioned table no longer has
partitions. An ANALYZE doing that proceeded to apply the inplace update
of pg_class.reltuples to the old pg_class tuple instead of the new
tuple, losing that reltuples=0 change if the ANALYZE committed.
Non-partitioning inheritance trees were unaffected. Back-patch to v14,
where commit 375aed36ad83f0e021e9bdd3a0034c0c992c66dc introduced
maintenance of partitioned table pg_class.reltuples.

Reported by Alexander Lakhin.

Discussion: https://postgr.es/m/a295b499-dcab-6a99-c06e-01cf60593344@gmail.com
src/backend/commands/analyze.c diff | blob | blame | history
src/test/regress/expected/vacuum.out diff | blob | blame | history
src/test/regress/sql/vacuum.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /