Re: Needless additional partition check in INSERT?
David Rowley <david.rowley@2ndquadrant.com>
From: David Rowley <david.rowley@2ndquadrant.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Simon Riggs <simon@2ndquadrant.com>,
Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Robert Haas <robertmhaas@gmail.com>, Amit Langote <amitlangote09@gmail.com>,
Amit Khandekar <amitdkhan.pg@gmail.com>
Date: 2018-06-08T16:43:08Z
Lists: pgsql-hackers
On 9 June 2018 at 03:24, Alvaro Herrera <alvherre@2ndquadrant.com> wrote: > I was also wondering about introducing a new function call in this path > where previously was none. Given the amount of other stuff that's > happening when a tuple is inserted, I suppose it's not worth worrying > about in terms of making this an inline function in the header. I wondered about that too. I've not tested it again, but I do have another patch locally which can about double the speed of COPY FROM for partitioned tables, so I have to admit I did gawk at the additional function call idea, but I'd rather see this fixed than on the shelf, so I went with it. I'll leave it up to you to how you'd like to format the if statement. I've written it the way I'm happy with. -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Commits
-
Don't needlessly check the partition contraint twice
- 5b0c7e2f757a 11.0 landed