Re: [HACKERS] Partitioned tables and relfilenode

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [HACKERS] Partitioned tables and relfilenode
Дата
Msg-id CAB7nPqQ71azDg=Kg-9ZtWt809NAnbT1f9w1XQP1CLdRnU2pyuA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Partitioned tables and relfilenode  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Ответы Re: [HACKERS] Partitioned tables and relfilenode
Список pgsql-hackers
On Fri, Mar 3, 2017 at 10:02 AM, Amit Langote
<Langote_Amit_f8@lab.ntt.co.jp> wrote:
> Thanks.  I noticed that 'and' is duplicated in a line added by the commit
> to analyze.sgml.  Attached 0001 fixes that.  0002 and 0003 same as the
> last version.
   /*
-    * If all the children were temp tables, pretend it's a non-inheritance
-    * situation.  The duplicate RTE we added for the parent table is
-    * harmless, so we don't bother to get rid of it; ditto for the useless
-    * PlanRowMark node.
+    * If all the children were temp tables or if the parent is a partitioned
+    * table without any leaf partitions, pretend it's a non-inheritance
+    * situation.  The duplicate RTE for the parent table we added in the
+    * non-partitioned table case is harmless, so we don't bother to get rid
+    * of it; ditto for the useless PlanRowMark node.    */
-   if (list_length(appinfos) < 2)
+   if (!has_child)
This comment is not completely correct. Children can be temp tables,
they just cannot be temp tables of other backends. It seems to me that
you could still keep this code simple and remove has_child..

@@ -932,7 +932,6 @@ extractRelOptions(HeapTuple tuple, TupleDesc tupdesc,       case RELKIND_RELATION:       case
RELKIND_TOASTVALUE:      case RELKIND_MATVIEW:
 
-       case RELKIND_PARTITIONED_TABLE:           options = heap_reloptions(classForm->relkind, datum, false);
break;
 
Partitioned tables cannot have reloptions? What about all the
autovacuum_* parameters then? Those are mainly not storage-related.
-- 
Michael



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Rafia Sabih
Дата:
Сообщение: [HACKERS] TPC-H Q20 from 1 hour to 19 hours!
Следующее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: [HACKERS] [BUG FIX] Removing NamedLWLockTrancheArray