Re: SerializeParamList vs machines with strict alignment

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, hlinnaka <hlinnaka(at)iki(dot)fi>
Subject: Re: SerializeParamList vs machines with strict alignment
Date: 2018-10-02 03:42:59
Message-ID: CAA4eK1KFx+942LJSMt9-Z1p5yvmLqoXv78PaOsKYDgTnepTQ-g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 2, 2018 at 7:08 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> writes:
> > I think if we do Analyze on the table after populating rows, it should
> > use just one worker and that should be sufficient to hit the case
> > being discussed. I would like to change the test so that it uses just
> > one worker.
>
> I thought that adding an ANALYZE would make the test be net slower, not
> faster; ANALYZE isn't free, even on just a row or so.
>

Hmm, I am curious to know what is your theory behind this? I was
under impression that spawning two additional workers would cost more
than Analyze.

> Also, I believe
> that coding the test this way makes the leader send the param values to
> multiple workers, which would flush out any problems with serializing a
> value multiple times. As against that, there's a hazard that the number
> of workers might not be stable ...

Yeah, I was actually more worried about instability part, but now I
have tested it on both windows and centos machine and the test passes,
so I am okay with that. However, I feel if we want to go with that,
there is actually no need of statement "SET force_parallel_mode=1".
That statement is required to force parallelism on such a small table.
It won't harm, but is misleading and in future people will try to copy
it in other tests

> but it seems like we have lots of
> other occurrences of that same hazard elsewhere in this test script.
>

Right.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-10-02 03:52:30 Re: SerializeParamList vs machines with strict alignment
Previous Message Michael Paquier 2018-10-02 03:00:51 Re: [HACKERS] Client Connection redirection support for PostgreSQL