Track detached partitions more accurately in partdescs
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 6 May 2021 16:47:30 +0000 (12:47 -0400)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 6 May 2021 16:47:30 +0000 (12:47 -0400)
commit3fe773b149755977d2ffde2afd89557b39d0afd9
tree1f3685487291a4d1d6cf78766e2c5553b4fb4721
parentc38cadc0907a8d071b043b2b32b83efa09db38ea
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
src/backend/partitioning/partdesc.c
src/include/utils/rel.h