Re:Limit length of queryies in pg_stat_statement extension

2025-01-19 Thread 赵庭海(庭章)
Hi, Thanks for your answer. > I don't think that it would move the needle much. Deallocating entries is > very > expensive, even when the query text file isn't being cleaned up, as it needs > to > sort all entries by usage to remove the least recently used all with an > exclusive pgss->lock.

Re: Re:Limit length of queryies in pg_stat_statement extension

2025-01-18 Thread Julien Rouhaud
On Sun, Jan 19, 2025 at 03:32:19AM +0800, 赵庭海(庭章) wrote: > > I'm sorry I left out some details earlier. I found that the garbage collect > backend process was in the loop of gc_qtexts while for a long time. The main > backtrace is below. > > ``` > #0 0x7fc528d6aba0 in __write_nocancel () from