Thread

Commits

  1. Doc: fix outdated wording about parallel seq scans

  2. Allocate consecutive blocks during parallel seqscans

  1. Documentation refinement for Parallel Scans

    Zhang Mingli <zmlpostgres@gmail.com> — 2022-10-20T03:02:52Z

    Hi,
    
    Found documents about parallel scan may be not so accurate.
    
    As said in parallel.smgl:
    
    ```
    In a parallel sequential scan, the table's blocks will be divided among the cooperating processes. Blocks are handed out one at a time, so that access to the table remains sequential.
    ```
    
    To my understanding, this was right before. Because we return one block if a worker ask for before commit 56788d2156.
    As comments inside table_block_parallelscan_nextpage:
    ```
    Earlier versions of this would allocate the next highest block number to the next worker to call this function.
    ```
    And from commit 56788d2156, each parallel worker will try to get ranges of blocks “chunks".
    Access to the table remains sequential inside each worker’s process, but not across all workers or the parallel query.
    Shall we update the documents?
    
    Regards,
    Zhang Mingli
    
  2. Re: Documentation refinement for Parallel Scans

    David Rowley <dgrowleyml@gmail.com> — 2022-10-20T06:33:34Z

    On Thu, 20 Oct 2022 at 16:03, Zhang Mingli <zmlpostgres@gmail.com> wrote:
    > As said in parallel.smgl:
    >
    > In a parallel sequential scan, the table's blocks will be divided among the cooperating processes. Blocks are handed out one at a time, so that access to the table remains sequential.
    
    > Shall we update the documents?
    
    Yeah, 56788d215 should have updated that. Seems I didn't expect that
    level of detail in the docs. I've attached a patch to address this.
    
    I didn't feel the need to go into too much detail about how the sizes
    of the ranges are calculated. I tried to be brief, but I think I did
    leave enough in there so that a reader will know that we don't just
    make the range length <nblocks> / <nworkers>.
    
    I'll push this soon if nobody has any other wording suggestions.
    
    Thanks for the report.
    
    David
    
  3. Re: Documentation refinement for Parallel Scans

    David Rowley <dgrowleyml@gmail.com> — 2022-10-20T20:31:40Z

    On Thu, 20 Oct 2022 at 19:33, David Rowley <dgrowleyml@gmail.com> wrote:
    > I'll push this soon if nobody has any other wording suggestions.
    
    Pushed.
    
    Thanks for the report.
    
    David