Re: Cache invalidation after authentication (on-the-fly role creation)

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Cache invalidation after authentication (on-the-fly role creation)
Date: 2018-07-04 04:25:18
Message-ID: CAEepm=3V80pkFFS5i9+LzJHtJicvE4Fsxe9a8nTUXyeB6E3EAg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 4, 2018 at 12:10 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> On 2018-07-03 19:44:21 -0400, Alvaro Herrera wrote:
>> On 2018-Jul-04, Thomas Munro wrote:
>> > PerformAuthentication(MyProcPort);
>> > + AcceptInvalidationMessages();
>> > InitializeSessionUserId(username, useroid);
>> >
>> > Any objections?
>>
>> Is there a measurable performance overhead to this change?
>
> I can't see it being relevant here. We accept inval message in plenty
> other places, and in comparison to session startup it should be just
> about inmeasurable.

Yeah, using "pgbench -c 8 -j 8 -T 60 --connect -S -M prepared
postgres" I wasn't able to measure a significant difference on my
laptop. The performance was equally terrible, at around 940 TPS +/-
10 including connection time. Adding to open commitfest.

--
Thomas Munro
http://www.enterprisedb.com

Attachment Content-Type Size
0001-Call-AcceptInvalidationMessages-after-authenticating.patch application/octet-stream 1.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-07-04 04:35:23 Re: Cache invalidation after authentication (on-the-fly role creation)
Previous Message Amit Langote 2018-07-04 02:47:05 move PartitionDispatchData definition to execPartition.c