Re: Notes about Pl/PgSQL assignment performance

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Andrey Zhidenkov <pensnarik(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Notes about Pl/PgSQL assignment performance
Date: 2017-12-19 14:06:23
Message-ID: CAKJS1f_qqkhWwnbeTygUDg9XKJveAkQ2R8xOuXimTJ-sGe=JaA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 20 December 2017 at 02:48, Andrey Zhidenkov <pensnarik(at)gmail(dot)com> wrote:
> PLPGSQL_STMT_ASSIGN -> exec_stmt_assign() -> exec_assign_expr() ->
> exec_eval_expr() -> exec_run_select() -> SPI_execute_plan_with_paramlist()
> -> _SPI_execute_plan() which finnaly calls PushActiveSnapshot() and
> PopActiveSnapshot() wich just do memory context allocations and use malloc()
> to copy snaphot.

Probably the best thing to do is to look at which functions are taking
the most time by doing a perf record for a single running instance,
then the same again with multiple instances running. Perhaps something
in there might appear in the samples more often with the multiple
instances than it does with a single instance.

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Marina Polyakova 2017-12-19 14:07:47 Re: WIP Patch: Pgbench Serialization and deadlock errors
Previous Message Pavel Stehule 2017-12-19 13:54:47 Re: Using ProcSignal to get memory context stats from a running backend