pgsql: Don't lose partitioned table reltuples=0 after relhassubclass=f.

Поиск
Список
Период
Сортировка
От Noah Misch
Тема pgsql: Don't lose partitioned table reltuples=0 after relhassubclass=f.
Дата
Msg-id E1sSeOw-001Vz7-2C@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f5bb46fb2e65f951fe22c166756dab9743b33a8a

Modified Files
--------------
src/backend/commands/analyze.c       |  7 +++++-
src/test/regress/expected/vacuum.out | 47 ++++++++++++++++++++++++++++++++++++
src/test/regress/sql/vacuum.sql      | 29 ++++++++++++++++++++++
3 files changed, 82 insertions(+), 1 deletion(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: pgsql: Make sure to run pg_isready on correct port
Следующее
От: Andrew Dunstan
Дата:
Сообщение: pgsql: Use correct collate.windows.win1252.out