From: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
---|---|
To: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Partitioned tables and relfilenode |
Date: | 2017-03-21 16:19:53 |
Message-ID: | CANP8+jLM3Gdkr=wysD9JJaX52pXBh_rAyE27AbkfuM34Nm4qMQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 16 March 2017 at 10:03, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> On 2017/03/15 7:09, Robert Haas wrote:
>> I think that eliding the Append node when there's only one child may
>> be unsafe in the case where the child's attribute numbers are
>> different from the parent's attribute numbers. I remember Tom making
>> some comment about this when I was working on MergeAppend, although I
>> no longer remember the specific details.
>
> Append node elision does not occur in the one-child case. With the patch:
...
> create table q1 partition of q for values in (1);
> explain select * from q;
> QUERY PLAN
> ------------------------------------------------------------
> Append (cost=0.00..35.50 rows=2550 width=4)
> -> Seq Scan on q1 (cost=0.00..35.50 rows=2550 width=4)
> (2 rows)
>
> Maybe that should be done, but this patch doesn't implement that.
Robert raises the possible problem that removing the Append wouldn't
work when the parent and child attribute numbers don't match. Surely
that never happens with partitions, by definition?
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2017-03-21 16:21:27 | Re: Patch: Write Amplification Reduction Method (WARM) |
Previous Message | Pavel Stehule | 2017-03-21 16:19:40 | Re: [COMMITTERS] pgsql: Add missing support for new node fields |