pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Isaac Morland <isaac.morland@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Faster "SET search_path"
Date: Tue, 1 Aug 2023 22:07:20 -0700
Message-ID: <20230802050720.GB866741@nathanxps13> (raw)
In-Reply-To: <f555c41554c7f5ff2699c085836ea94beac09bad.camel@j-davis.com>
References: <04c8592dbd694e4114a3ed87139a7a04e4363030.camel@j-davis.com>
	<CAMsGm5fZ2xiVDLYH4-_Ld8bfe1qwY23ZLgPc7zBpH8d1WUw70A@mail.gmail.com>
	<f555c41554c7f5ff2699c085836ea94beac09bad.camel@j-davis.com>

On Mon, Jul 31, 2023 at 10:28:31PM -0700, Jeff Davis wrote:
> On Sat, 2023-07-29 at 12:44 -0400, Isaac Morland wrote:
>> Essentially, "just" observe efficiently (somehow) that no change is
>> needed, and skip changing it?
> 
> I gave this a try and it speeds things up some more.
> 
> There might be a surprise factor with an optimization like that,
> though. If someone becomes accustomed to the function running fast,
> then changing the search_path in the caller could slow things down a
> lot and it would be hard for the user to understand what happened.

I wonder if this is a good enough reason to _not_ proceed with this
optimization.  At the moment, I'm on the fence about it.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com





view thread (28+ messages)  latest in thread

Message-ID: <20230802050720.GB866741@nathanxps13>
Permalink:  ../20230802050720.GB866741@nathanxps13/
Also on:    postgresql.org/message-id/20230802050720.GB866741@nathanxps13

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, pgsql@j-davis.com, isaac.morland@gmail.com
  Subject: Re: Faster "SET search_path"
  In-Reply-To: <20230802050720.GB866741@nathanxps13>
  References: <04c8592dbd694e4114a3ed87139a7a04e4363030.camel@j-davis.com> <CAMsGm5fZ2xiVDLYH4-_Ld8bfe1qwY23ZLgPc7zBpH8d1WUw70A@mail.gmail.com> <f555c41554c7f5ff2699c085836ea94beac09bad.camel@j-davis.com> <20230802050720.GB866741@nathanxps13>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox