Re: Transaction commits VS Transaction commits (with parallel) VS query mean time

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Transaction commits VS Transaction commits (with parallel) VS query mean time
Date: 2019-02-09 05:07:13
Message-ID: CAA4eK1LOP_j-StBZQd9XfCyvyC5LSrONLPz1Jzq-uYHtdGsK=g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Feb 8, 2019 at 6:55 AM Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com> wrote:
>
> On Thu, Feb 7, 2019 at 9:31 PM Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com> wrote:
>>
>>
>> This is because of larger xact_commit value than default configuration. With the changed server configuration, that leads to generate more parallel workers and every parallel worker operation is treated as an extra commit, because of this reason, the total number of commits increased, but the overall query performance is decreased.
>>
>> Is there any relation of transaction commits to performance?
>>
>> Is there any specific reason to consider the parallel worker activity also as a transaction commit? Especially in my observation, if we didn't consider the parallel worker activity as separate commits, the test doesn't show an increase in transaction commits.
>
>
> The following statements shows the increase in the xact_commit value with
> parallel workers. I can understand that workers updating the seq_scan stats
> as they performed the seq scan.
>

Yeah, that seems okay, however, one can say that for the scan they
want to consider it as a single scan even if part of the scan is
accomplished by workers or may be a separate counter for parallel
workers scan.

> Is the same applied to parallel worker transaction
> commits also?
>

I don't think so. It seems to me that we should consider it as a
single transaction. Do you want to do the leg work for this and try
to come up with a patch? On a quick look, I think we might want to
change AtEOXact_PgStat so that the commits for parallel workers are
not considered. I think the caller has that information.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Edmund Horner 2019-02-09 07:12:53 Re: Patch for SortSupport implementation on inet/cdir
Previous Message Tom Lane 2019-02-09 04:17:51 Re: First-draft release notes for next week's releases