Re: Minor cleanup for search path cache

2024-01-02 Thread Tom Lane
Jeff Davis writes: > Looks good to me. Thanks for reviewing, will push shortly. regards, tom lane

Re: Minor cleanup for search path cache

2024-01-02 Thread Jeff Davis
On Mon, 2024-01-01 at 16:38 -0500, Tom Lane wrote: > I happened to notice that there is a not-quite-theoretical crash > hazard in spcache_init().  If we see that SPCACHE_RESET_THRESHOLD > is exceeded and decide to reset the cache, but then nsphash_create > fails for some reason (perhaps OOM), an er

Re: Minor cleanup for search path cache

2024-01-01 Thread Tom Lane
Zhang Mingli writes: > Only me? > zml@localhashdata postgres % git apply minor-search-path-cache-cleanup.patch > error: patch failed: src/backend/catalog/namespace.c:156 > error: src/backend/catalog/namespace.c: patch does not apply > error: patch failed: src/tools/pgindent/typedefs.list:2479 > e

Re: Minor cleanup for search path cache

2024-01-01 Thread Zhang Mingli
Hi, Zhang Mingli www.hashdata.xyz On Jan 2, 2024 at 05:38 +0800, Tom Lane , wrote: > I happened to notice that there is a not-quite-theoretical crash > hazard in spcache_init(). If we see that SPCACHE_RESET_THRESHOLD > is exceeded and decide to reset the cache, but then nsphash_create > fails for

Minor cleanup for search path cache

2024-01-01 Thread Tom Lane
I happened to notice that there is a not-quite-theoretical crash hazard in spcache_init(). If we see that SPCACHE_RESET_THRESHOLD is exceeded and decide to reset the cache, but then nsphash_create fails for some reason (perhaps OOM), an error will be thrown leaving the SearchPathCache pointer poin