Re: Potential "AIO / io workers" inter-worker locking issue in PG18?
| От | David Rowley | 
|---|---|
| Тема | Re: Potential "AIO / io workers" inter-worker locking issue in PG18? | 
| Дата | |
| Msg-id | CAApHDvr4o1QjDOD0avSB-3=943E7uJJ5EmRmJyGsD5m5aSA+3Q@mail.gmail.com обсуждение исходный текст  | 
		
| Ответ на | Re: Potential "AIO / io workers" inter-worker locking issue in PG18? (Marco Boeringa <marco@boeringa.demon.nl>) | 
| Ответы | 
                	
            		Re: Potential "AIO / io workers" inter-worker locking issue in PG18?
            		
            		 | 
		
| Список | pgsql-bugs | 
On Tue, 21 Oct 2025 at 09:02, Marco Boeringa <marco@boeringa.demon.nl> wrote: > https://stackoverflow.com/questions/20718499/does-postgresql-cache-function-calls#comment31095072_20718499 > > And in relation to that post and thread, and the suggestion of WITH / > CTE clause, would that be a suitable substitute and avoid the recalling > of the functions? I assume with the MATERIALIZED option, it should, that > is what the MATERIALIZED option is for, isn't it? That article states "this function is invoked multiple times with the same parameter", so doesn't sound very applicable for your case since your function parameter changes with every row. I don't see how WITH MATERIALIZED could help you here as that's not a parameterized cache. I suppose we could adjust the planner to consider something similar to Memoize for caching results for expensive stable functions. We'd have to put a lot of trust into n_distinct estimates and the function(s) COST setting, however. I suspect you're trying to optimise for something that's not an actual problem. David
В списке pgsql-bugs по дате отправления: