Memory leak in CachememoryContext

2023-04-19 Thread Ajit Awekar
Please find below simple repro for CacheMemoryContext memory leak create type two_int4s as (f1 int4, f2 int4); create type two_int8s as (q1 int8, q2 int8); PLpgSQL example: do $$ declare c4 two_int4s; c8 two_int8s; begin c8 := row(1,2); c4 := c8; end$$; Executing above plpgsql in same memory

Re: Memory leak in CachememoryContext

2023-04-21 Thread Ajit Awekar
Hi Tom, Thanks a lot for your possible approach for a solution. I have implemented the approach by splitting the hash table into two parts. Please find the attached patch for the same. Thanks & Best Regards, Ajit On Wed, Apr 19, 2023 at 10:13 PM Tom Lane wrote: > Ajit Awekar

Re: Memory leak in CachememoryContext

2023-04-24 Thread Ajit Awekar
Tom, Thanks a lot for your patch. I applied the changes and confirmed there is no memory leak with the V2 patch. We are not using MemoryContext variables "cast_hash_context" and "shared_cast_context". Thanks & Best Regards, Ajit On Sat, Apr 22, 2023 at 4:49 AM Tom Lan

Re: Unnecessary scan from non-overlapping range predicates

2025-06-25 Thread Ajit Awekar
Hi Tom, Thanks a lot for sharing. The GUC constraint_exclusion setting is helpful, especially for handling poorly written queries. Thanks & Best Regards, Ajit On Wed, 25 Jun 2025 at 21:58, Tom Lane wrote: > Ajit Awekar writes: > > EXPLAIN (costs off) > > select * from p

Unnecessary scan from non-overlapping range predicates

2025-06-25 Thread Ajit Awekar
Hi Team, Please find below an observation regarding query planning that leads to unnecessary table scan when the WHERE clause contains non-overlapping conditions. EXPLAIN (costs off) select * from products where price < 100 AND price > 300; Seq Scan on products Filter: ((price < '100'::numeri