Re: Notes about Pl/PgSQL assignment performance

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Andrey Zhidenkov <pensnarik(at)gmail(dot)com>
Cc: 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 13:34:02
Message-ID: 20171219133402.eeftlylovf5olbvl@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrey Zhidenkov wrote:
> When I run this test in 2 threads I expect that running time will be the
> same, because PostgreSQL will fork process for the second connection and
> this process will be served by a separate CPU core because I have more than
> 2 cores.
> Yes, IMMUTABLE flag helps, but I think It's just because Postgres actually
> executes procedure only once.

Just a guess without actually looking at the WaitEvents (which you
should do) is that this is blocking on snapshot acquisition or something
like that.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christoph Berg 2017-12-19 13:40:12 Re: Package version in PG_VERSION and version()
Previous Message Marina Polyakova 2017-12-19 13:26:16 WIP Patch: Pgbench Serialization and deadlock errors