Re: [HACKERS] A bug in mapping attributes in ATExecAttachPartition()
От | Robert Haas |
---|---|
Тема | Re: [HACKERS] A bug in mapping attributes in ATExecAttachPartition() |
Дата | |
Msg-id | CA+TgmoYs+29fL0NAfrg5XTHJ9N1vFhzHUSO7BoW4uqTjoRnk9w@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] A bug in mapping attributes in ATExecAttachPartition() (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>) |
Ответы |
Re: [HACKERS] A bug in mapping attributes in ATExecAttachPartition()
|
Список | pgsql-hackers |
On Mon, Jul 31, 2017 at 11:10 PM, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> wrote: > OK, these cosmetic changes are now in attached patch 0001. Regarding 0001: - List *childrels; + List *attachRel_children; I sorta don't see why this is necessary, or better. /* It's safe to skip the validation scan after all */ if (skip_validate) + { + /* No need to scan the table after all. */ The existing comment should be removed along with adding the new one, I think. - if (part_rel != attachRel && - part_rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE) + if (part_rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE) { - heap_close(part_rel, NoLock); + if (part_rel != attachRel) + heap_close(part_rel, NoLock); This works out to a cosmetic change, I guess, but it makes it worse... -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: