Re: Faster "SET search_path"

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Isaac Morland <isaac(dot)morland(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Faster "SET search_path"
Date: 2023-11-17 00:46:10
Message-ID: e6fded24cb8a2c53d4ef069d9f69cc7baaafe9ef.camel@j-davis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 2023-11-14 at 20:13 -0800, Jeff Davis wrote:
> On Thu, 2023-10-19 at 19:01 -0700, Jeff Davis wrote:
> > 0003: Cache for recomputeNamespacePath.
>
> Committed with some further simplification around the OOM handling.

While I considered OOM during hash key initialization, I missed some
other potential out-of-memory hazards. Attached a fixup patch 0003,
which re-introduces one list copy but it simplifies things
substantially in addition to being safer around OOM conditions.

> > 0004: Use the same cache to optimize check_search_path().
> > 0005: Optimize cache for repeated lookups of the same value.

Also attached new versions of these patches.

Regards,
Jeff Davis

Attachment Content-Type Size
v9-0005-Optimize-SearchPathCache-by-saving-the-last-entry.patch text/x-patch 4.4 KB
v9-0004-Optimize-check_search_path-by-using-SearchPathCac.patch text/x-patch 3.4 KB
v9-0003-Be-more-paranoid-about-OOM-when-changing-search_p.patch text/x-patch 6.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-11-17 01:01:08 Re: Remove MSVC scripts from the tree
Previous Message Melanie Plageman 2023-11-17 00:43:43 Re: lazy_scan_heap() should release lock on buffer before vacuuming FSM