Обсуждение: pgsql: Track detached partitions more accurately in partdescs

Поиск
Список
Период
Сортировка

pgsql: Track detached partitions more accurately in partdescs

От
Alvaro Herrera
Дата:
Track detached partitions more accurately in partdescs

In d6b8d29419df I (Álvaro) was sloppy about recording whether a
partition descripor does or does not include detached partitions, when
the snapshot checking does not see the pg_inherits row marked detached.
In that case no partition was omitted, yet in the relcache entry we were
saving the partdesc as omitting partitions.  Flip that (so we save it as
a partdesc not omitting partitions, which indeed it doesn't), which
hopefully makes the code easier to reason about.

Author: Amit Langote <amitlangote09@gmail.com>
Discussion: https://postgr.es/m/CA+HiwqE7GxGU4VdzwZzfiz+Ont5SsopoFkgtrZGEdPqWRL+biA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3fe773b149755977d2ffde2afd89557b39d0afd9

Modified Files
--------------
src/backend/partitioning/partdesc.c | 22 ++++++++++++++++------
src/include/utils/rel.h             |  4 +---
2 files changed, 17 insertions(+), 9 deletions(-)