Re: Parallel Foreign Scans - need advice

From: Korry Douglas <korry(at)me(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parallel Foreign Scans - need advice
Date: 2019-05-15 17:45:45
Message-ID: 0CC4C22A-AFA6-4045-B7D5-ADA222D5C098@me.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


>> But, nworkers_launched is always set to 0 in
>> InitializeDSMForeignScan(), so that won’t work. Any other ideas?
>
> At that state it's simply not yet known how many workers will be
> actually launched (they might not start successfully or such). Why do
> you need to know it there and not later?
>
> - Andres

I need to know at some point *before* I actually start scanning. The ParallelContext pointer is only available in EstimateDSMForeignScan(), InitializeDSMForeignScan(), and ReInitializeDSMForeignScan().

If there is some other way to discover the actual worker count, I’m open to that. The three functions above are not particularly helpful to me so I’m happy to look somewhere else.

— Korry

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-05-15 17:53:26 Re: New EXPLAIN option: ALL
Previous Message Peter Eisentraut 2019-05-15 17:44:22 Re: Why does ExecComputeStoredGenerated() form a heap tuple