Re: CREATE FUNCTION ... SEARCH { DEFAULT | SYSTEM | SESSION }

Jeff Davis <pgsql@j-davis.com>

From: Jeff Davis <pgsql@j-davis.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Peter Eisentraut <peter@eisentraut.org>, pgsql-hackers@postgresql.org
Date: 2023-12-05T00:55:40Z
Lists: pgsql-hackers

Attachments

On Tue, 2023-11-21 at 09:24 -0500, Robert Haas wrote:
> As to the second, could we somehow come
> up with an API for guc.c where you can ask for an opaque handle that
> will later allow you to do a fast-SET of a GUC?

Yes, attached. That provides a significant speedup: my test goes from
around ~7300ms to ~6800ms.

This doesn't seem very controversial or complex, so I'll probably
commit this soon unless someone else has a comment.

-- 
Jeff Davis
PostgreSQL Contributor Team - AWS


Commits

  1. Cache opaque handle for GUC option to avoid repeasted lookups.

  2. Add cache for recomputeNamespacePath().