Re: Parallel Seq Scan

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Parallel Seq Scan
Дата
Msg-id CAA4eK1JmLK3oKs-17s4BzHToMYBsEJfofosPdRo1PfGP7eqUmA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Parallel Seq Scan  (Kouhei Kaigai <kaigai@ak.jp.nec.com>)
Список pgsql-hackers
On Wed, Jul 29, 2015 at 7:32 PM, Kouhei Kaigai <kaigai@ak.jp.nec.com> wrote:
>
> Hi Amit,
>
> Could you tell me the code intention around ExecInitFunnel()?
>
> ExecInitFunnel() calls InitFunnel() that opens the relation to be
> scanned by the underlying PartialSeqScan and setup ss_ScanTupleSlot
> of its scanstate.

The main need is for relation descriptor which is then required to set
the scan tuple's slot.  Basically it is required for tuples flowing from
worker which will use the scan tuple slot of FunnelState.


> According to the comment of InitFunnel(), it open the relation and
> takes appropriate lock on it. However, an equivalent initialization
> is also done on InitPartialScanRelation().
>
> Why does it acquire the relation lock twice?
>

I think locking twice is not required, it is just that I have used the API
ExecOpenScanRelation() which is used during other node's initialisation
due to which it lock's twice.  I think in general it should be harmless.



With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

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

Предыдущее
От: Corey Huinker
Дата:
Сообщение: Re: dblink: add polymorphic functions.
Следующее
От: Andres Freund
Дата:
Сообщение: Re: upgrade failure from 9.5 to head