RE: A reloption for partitioned tables - parallel_workers

Поиск
Список
Период
Сортировка
От Hou, Zhijie
Тема RE: A reloption for partitioned tables - parallel_workers
Дата
Msg-id d5416a5e292249ebbabd8bbe592f0b70@G08CNEXMBPEKD05.g08.fujitsu.local
обсуждение исходный текст
Ответ на Re: A reloption for partitioned tables - parallel_workers  ("Seamus Abshere" <seamus@abshere.net>)
Ответы Re: A reloption for partitioned tables - parallel_workers
Список pgsql-hackers
> hi,
>
> Here we go, my first patch... solves
> https://www.postgresql.org/message-id/7d6fdc20-857c-4cbe-ae2e-c0ff9520
> ed55@www.fastmail.com
>

Hi,

partitioned_table_reloptions(Datum reloptions, bool validate)
 {
+    static const relopt_parse_elt tab[] = {
+        {"parallel_workers", RELOPT_TYPE_INT,
+        offsetof(StdRdOptions, parallel_workers)},
+    };
+
     return (bytea *) build_reloptions(reloptions, validate,
                                       RELOPT_KIND_PARTITIONED,
-                                      0, NULL, 0);
+                                      sizeof(StdRdOptions),
+                                      tab, lengthof(tab));
 }

I noticed that you plan to store the parallel_workers in the same struct(StdRdOptions) as normal heap relation.
It seems better to store it in a separate struct.

And as commit 1bbd608 said:
----
> Splitting things has the advantage to
> make the information stored in rd_options include only the necessary
> information, reducing the amount of memory used for a relcache entry
> with partitioned tables if new reloptions are introduced at this level.
----

What do you think?

Best regards,
Houzj









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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: [HACKERS] logical decoding of two-phase transactions
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: [PATCH] pg_hba.conf error messages for logical replication connections