lwlock:LockManager wait_events

2024-10-24 Thread James Pang
experts, we faced into a lot of lwlock:LockManager wait-events , all of these queries are "select ..." , there are other several session are doing DML, insert/update/delete on same table. Did these DML transactions holding "transactionid" and "tuple" lock blocking "select" on lwlock:LockMan

Re: Unexpected Performance for the Function simplify_function

2024-10-24 Thread Tom Lane
Ba Jinsheng writes: > I am not proposing a fixing patch, as the patch is incorrect. Instead, I just > want to show disabling the simplify_function() function brings performance > benefit, and it seems unexpected. I am wondering whether we can optimize > simplify_function() to make the performan

Re: Unexpected Performance for the Function simplify_function

2024-10-24 Thread Tom Lane
Shiv Iyer writes: > The query plans and results you shared illustrate the unexpected > performance differences between using and bypassing the simplify_function() > logic in PostgreSQL’s optimizer. Here’s an in-depth analysis and thoughts > on optimizing this scenario: Just out of curiosity, was

Re: Unexpected Performance for the Function simplify_function

2024-10-24 Thread Greg Sabino Mullane
On Thu, Oct 24, 2024 at 3:49 PM Shiv Iyer wrote: > Hello, > > > The query plans and results you shared illustrate the unexpected > performance differences between using and bypassing the > simplify_function() logic in PostgreSQL’s optimizer. Here’s an in-depth > analysis and thoughts on optimizin

Re: Unexpected Performance for the Function simplify_function

2024-10-24 Thread David G. Johnston
On Thursday, October 24, 2024, Tom Lane wrote: > Shiv Iyer writes: > > The query plans and results you shared illustrate the unexpected > > performance differences between using and bypassing the > simplify_function() > > logic in PostgreSQL’s optimizer. Here’s an in-depth analysis and thoughts

Re: Unexpected Performance for the Function simplify_function

2024-10-24 Thread Andrei Lepikhov
On 10/25/24 02:43, Ba Jinsheng wrote: I am not proposing a fixing patch, as the patch is incorrect. Instead, I just want to show disabling the simplify_function() function brings performance benefit, and it seems unexpected. I am wondering whether we can optimize simplify_function() to make the

Adding exclusion constraint in a big table

2024-10-24 Thread Marcelo Fernandes
Hi folks, I need to add an exclusion constraint in a large table. However, I'm worried about the length of time the table will be blocked for reads and writes while the constraint is being created. With other operations, like adding unique indexes, I can create the index first, concurrently, and