Use key and partdesc from PartitionDispatch where possible

Enterprise / PostgreSQL - Robert Haas [postgresql.org] - 27 July 2018 13:40 EDT

Instead of repeatedly fishing the data out of the relcache entry, let's use the version that we cached in the PartitionDispatch. We could alternatively rip out the PartitionDispatch fields altogether, but it doesn't make much sense to have them and not use them; before this patch, partdesc was set but altogether unused. Amit Langote and I both thought using them was a litle better than removing them, so this patch takes that approach.

Discussion: http://postgr.es/m/CA+TgmobFnxcaW-Co-XO8=yhJ5pJXoNkCj6Z7jm9Mwj9FGv-D7w@mail.gmail.com

3e32109049 Use key and partdesc from PartitionDispatch where possible.
src/backend/executor/execPartition.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)

Upstream: git.postgresql.org


  • Share