Re: [HACKERS] Runtime Partition Pruning
David Rowley <david.rowley@2ndquadrant.com>
From: David Rowley <david.rowley@2ndquadrant.com>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Jesper Pedersen <jesper.pedersen@redhat.com>, Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com>, Beena Emerson <memissemerson@gmail.com>,
Alvaro Herrera <alvherre@alvh.no-ip.org>, Robert Haas <robertmhaas@gmail.com>, amul sul <sulamul@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
Dilip Kumar <dilipbalaut@gmail.com>
Date: 2018-04-04T07:04:17Z
Lists: pgsql-hackers
On 4 April 2018 at 18:27, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> wrote: > On 2018/04/04 11:10, David Rowley wrote: >> On 4 April 2018 at 05:44, Jesper Pedersen <jesper.pedersen@redhat.com> wrote: >>> Also, I'm seeing a regression for check-world in >>> src/test/regress/results/inherit.out >>> >>> *************** >>> *** 642,648 **** >>> ---------------------+---+---+----- >>> mlparted_tab_part1 | 1 | a | >>> mlparted_tab_part2a | 2 | a | >>> ! mlparted_tab_part2b | 2 | b | xxx >>> mlparted_tab_part3 | 3 | a | xxx >>> (4 rows) >>> >>> --- 642,648 ---- >>> ---------------------+---+---+----- >>> mlparted_tab_part1 | 1 | a | >>> mlparted_tab_part2a | 2 | a | >>> ! mlparted_tab_part2b | 2 | b | >>> mlparted_tab_part3 | 3 | a | xxx >>> (4 rows) >>> >>> I'll spend some more time tomorrow. >> >> Yeah, it's a bug in v46 faster partition pruning. Discussing a fix for >> that with Amit over on [2]. > > I'm not sure if we've yet discussed anything that'd be related to this on > the faster pruning thread. hmm, yeah, I didn't really explain the context, but the report was in [1] Basically, the OR clause in the following SQL fragment was overwriting the scan_all_non_null value: where (mlp.a = ss.a and mlp.b = 'b') or mlp.a = 3; Basically the: result->scan_all_nonnull = step_result->scan_all_nonnull; The minimum fix would have been to change that line to: result->scan_all_nonnull |= step_result->scan_all_nonnull; Anyway, it all irrelevant now as that code has all changed. [1] https://www.postgresql.org/message-id/CAKJS1f_SHPuqDhQWJq-_P1kpPQn7BJt71yPbDP_8b3rhwFQyGA@mail.gmail.com -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Commits
-
Initialize ExprStates once in run-time partition pruning
- 1957f8dabf8d 11.0 landed
-
Add bms_prev_member function
- 5c0675215e15 11.0 landed
-
Support partition pruning at execution time
- 499be013de65 11.0 landed
-
Document partprune.c a little better
- 971d7ddbe19a 11.0 landed
-
Fix crash in pg_replication_slot_advance
- 6f1d723b6359 11.0 cited
-
Add parallel-aware hash joins.
- 1804284042e6 11.0 cited
-
Fix typo.
- 487a0c1518af 11.0 cited
-
Allow --with-bonjour to work with non-macOS implementations of Bonjour.
- 9b9cb3c4534d 11.0 cited
-
Mention need for --no-inc-recursive in rsync command
- 2c74e6c1dcc5 11.0 cited