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: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, 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-03-27 12:27:08
Message-ID: CAA4eK1KS33+_QoB3uc1B-uD_OY22q7ioz1UsLq_N=M4gKr6whg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 27, 2019 at 6:53 AM Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com> wrote:
> On Tue, Mar 26, 2019 at 9:08 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>>
>> As part of this thread, maybe we can
>> just fix the case of the parallel cooperating transaction.
>
>
> With the current patch, all the parallel implementation transaction are getting
> skipped, in my tests parallel workers are the major factor in the transaction
> stats counter. Even before parallelism, the stats of the autovacuum and etc
> are still present but their contribution is not greatly influencing the stats.
>
> I agree with you in fixing the stats with parallel workers and improve stats.
>

I was proposing to fix only the transaction started with
StartParallelWorkerTransaction by using is_parallel_worker flag as
discussed above. I understand that it won't completely fix the
problem reported by you, but it will be a step in that direction. My
main worry is that if we fix it the way you are proposing and we also
invent a new way to deal with all other internal transactions, then
the fix done by us now needs to be changed/reverted. Note, that this
fix needs to be backpatched as well, so we should avoid doing any fix
which needs to be changed or reverted.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christoph Berg 2019-03-27 12:43:52 Re: pg_upgrade version checking questions
Previous Message Ryan Lambert 2019-03-27 12:22:43 Re: Fix XML handling with DOCTYPE