Thread

Commits

  1. When passing query strings to workers, pass the terminating \0.

  2. Pass the source text for a parallel query to the workers.

  1. Shouldn't execParallel.c null-terminate query_string in the parallel DSM?

    Thomas Munro <thomas.munro@enterprisedb.com> — 2017-12-20T02:28:26Z

    Hi hackers,
    
    I just saw some trailing garbage in my log file emanating from a
    parallel worker when my query happened to be a BUFFERALIGNed length
    (in this case 64 characters).  Did commit 4c728f382970 forget to make
    sure the null terminator is copied?  See attached proposed fix.
    
    -- 
    Thomas Munro
    http://www.enterprisedb.com
    
  2. Re: Shouldn't execParallel.c null-terminate query_string in the parallel DSM?

    Rafia Sabih <rafia.sabih@enterprisedb.com> — 2017-12-20T07:03:03Z

    On Wed, Dec 20, 2017 at 7:58 AM, Thomas Munro <thomas.munro@enterprisedb.com
    > wrote:
    
    > Hi hackers,
    >
    > I just saw some trailing garbage in my log file emanating from a
    > parallel worker when my query happened to be a BUFFERALIGNed length
    > (in this case 64 characters).  Did commit 4c728f382970 forget to make
    > sure the null terminator is copied?  See attached proposed fix.
    >
    > Yes, I missed that.
    Your patch looks good to me, thanks.
    
    -- 
    Regards,
    Rafia Sabih
    EnterpriseDB: http://www.enterprisedb.com/
    
  3. Re: Shouldn't execParallel.c null-terminate query_string in the parallel DSM?

    Robert Haas <robertmhaas@gmail.com> — 2017-12-20T22:32:43Z

    On Wed, Dec 20, 2017 at 2:03 AM, Rafia Sabih
    <rafia.sabih@enterprisedb.com> wrote:
    > On Wed, Dec 20, 2017 at 7:58 AM, Thomas Munro
    > <thomas.munro@enterprisedb.com> wrote:
    >> I just saw some trailing garbage in my log file emanating from a
    >> parallel worker when my query happened to be a BUFFERALIGNed length
    >> (in this case 64 characters).  Did commit 4c728f382970 forget to make
    >> sure the null terminator is copied?  See attached proposed fix.
    >>
    > Yes, I missed that.
    > Your patch looks good to me, thanks.
    
    Sigh.  I missed that too.  Committed and back-patched to v10.
    
    -- 
    Robert Haas
    EnterpriseDB: http://www.enterprisedb.com
    The Enterprise PostgreSQL Company