Re: Parallel Inserts in CREATE TABLE AS

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: Parallel Inserts in CREATE TABLE AS
Дата
Msg-id CALj2ACWuA7sdMP+QSUijPwGzkV7MXBEMqVkK6EJ-0u7pGHtr9w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Parallel Inserts in CREATE TABLE AS  (Zhihong Yu <zyu@yugabyte.com>)
Ответы RE: Parallel Inserts in CREATE TABLE AS  ("Hou, Zhijie" <houzj.fnst@cn.fujitsu.com>)
Список pgsql-hackers
On Thu, Dec 10, 2020 at 7:48 AM Zhihong Yu <zyu@yugabyte.com> wrote:
> +           if (!OidIsValid(col->collOid) &&
> +               type_is_collatable(col->typeName->typeOid))
> +               ereport(ERROR,
> ...
> +           attrList = lappend(attrList, col);
>
> Should attrList be freed when ereport is called ?
>

I think that's not necessary since we are going to throw an error
anyways. And also that this is not a new code added as part of this
feature, it is an existing code adjusted for parallel inserts. On
looking further in the code base there are many places where we don't
free up the lists before throwing errors.

            errmsg("column privileges are only valid for relations")));
            errmsg("check constraint \"%s\" already exists",
            errmsg("name or argument lists may not contain nulls")));
            elog(ERROR, "no tlist entry for key %d", keyresno);

> +       query->CTASParallelInsInfo &= CTAS_PARALLEL_INS_UNDEF;
>
> Since CTAS_PARALLEL_INS_UNDEF is 0, isn't the above equivalent to assigning the value of 0 ?
>

Yeah both are equivalent. For now I will keep it that way, I will
change it in the next version of the patch.

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Refactor MD5 implementations and switch to EVP for OpenSSL
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: [Patch] Optimize dropping of relation buffers using dlist