Re: High CPU Usage of "SET ROLE"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ulf Lohbrügge <ulf(dot)lohbruegge(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: High CPU Usage of "SET ROLE"
Date: 2018-10-30 20:27:43
Message-ID: 17063.1540931263@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

=?UTF-8?Q?Ulf_Lohbr=C3=BCgge?= <ulf(dot)lohbruegge(at)gmail(dot)com> writes:
> I think I have found something here. It looks like that the order of
> statements is affecting their duration. I somehow have the feeling that the
> first statement after "RESET ROLE;" experiences a performance degradation.

Hm. It's well known that the first query executed in a *session* takes
a pretty big performance hit, because of the need to populate the
backend's catalog caches. I'm not very sure however why "RESET ROLE"
would result in a mass cache flush, if indeed that's what's happening.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Jeff Janes 2018-10-30 22:34:28 Re: High CPU Usage of "SET ROLE"
Previous Message Ulf Lohbrügge 2018-10-30 19:49:32 Re: High CPU Usage of "SET ROLE"