Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tels <nospam-pg-abuse(at)bloodgate(dot)com>, Stephen Froehlich <s(dot)froehlich(at)cablelabs(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?
Date: 2018-03-05 21:33:22
Message-ID: d3cdb226-475c-2bc2-f39a-d5a6d925bea5@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-novice

On 03/05/2018 08:57 PM, Alvaro Herrera wrote:
> Tomas Vondra wrote:
>
>> 4) I see you've added generateClonedExtStatsStmt to parse_utilcmd.h, but
>> it was only really called in parse_utilcmd.c, so I've made it static. I
>> don't think we need to expose stuff unnecessarily.
>
>> BTW the last point made me thinking, because parse_utilcmd.h also
>> exposes generateClonedIndexStmt. That is however necessary, because it's
>> called from DefineRelation when copying indexes from partitioned table
>> to partitions. I'm wondering - shouldn't we do the same thing for
>> extended statistics?
>
> Maybe, but that would not be a bugfix anymore. So if we do want that,
> that is definitely a new feature, so it should be its own patch; the
> copying of indexes to partitions is a new feature in pg11.
>

Sure, I wasn't really suggesting squashing that into this bugfix.
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2018-03-05 21:34:46 Re: Kerberos test suite
Previous Message Tomas Vondra 2018-03-05 21:32:12 Re: select_parallel test failure: gather sometimes losing tuples (maybe during rescans)?

Browse pgsql-novice by date

  From Date Subject
Next Message Alvaro Herrera 2018-03-05 22:08:15 Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?
Previous Message Alvaro Herrera 2018-03-05 19:57:50 Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?