Re: pgsql: Clarify use of temporary tables within partition trees
| От | David Rowley | 
|---|---|
| Тема | Re: pgsql: Clarify use of temporary tables within partition trees | 
| Дата | |
| Msg-id | CAKJS1f8ZerDq68ZTk9djC8unduhzCYN2ubHt_ornhtWSn_WByQ@mail.gmail.com обсуждение исходный текст  | 
		
| Ответ на | Re: pgsql: Clarify use of temporary tables within partition trees (Michael Paquier <michael@paquier.xyz>) | 
| Ответы | 
                	
            		Re: pgsql: Clarify use of temporary tables within partition trees
            		
            		 | 
		
| Список | pgsql-committers | 
On 3 July 2018 at 21:53, Michael Paquier <michael@paquier.xyz> wrote:
> Your patch removes this part:
> -   /*
> -    * If the partitioned table has no partitions or all the partitions are
> -    * temporary tables from other backends, treat this as non-inheritance
> -    * case.
> -    */
> -   if (!has_child)
> -       parentrte->inh = false;
>
> And adds this equivalent part:
> +   /*
> +    * If the partitioned table has no partitions, treat this as the
> +    * non-inheritance case.
> +    */
> +   if (partdesc->nparts == 0)
> +   {
> +       parentrte->inh = false;
> +       return;
> +   }
>
> As far as I can see from the coverage report, the former is not tested,
> and corresponds to the case of a partition leaf which is itself
> partitioned but has no partitions, and the new portion is equivalent to
> the part removed.  That ought to be tested, particularly as Amit
> mentions that there could be improvements with moving it around in
> future versions.
Oh okay. Yeah, you can hit that with a partitionless sub-partitioned table.
I've added a test in the attached v4.
-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services
		
	Вложения
В списке pgsql-committers по дате отправления: