Re: Planning performance problem (67626.278ms)

2021-06-20 Thread Tom Lane
Ranier Vilela writes: > 3. Avoid use of type *long*, it is very problematic with 64 bits. > Windows 64 bits, long is 4 (four) bytes. > Linux 64 bits, long is 8 (eight) bytes. Agreed. > 4. Avoid C99 style declarations > for(unsigned long i = 0;) > Prefer: >size_t i; >for(i = 0;) > Hel

Re: Estimating wal_keep_size

2021-06-20 Thread Dean Gibson (DB Administrator)
On 2021-06-16 17:36, Dean Gibson (DB Administrator) wrote: Is this reasonable thinking? I'd think that one would want a *wal_keep_size* to cover the pending updates while the standby server might be unavailable, however long one might anticipate that would be. In my case, I get a complete re

Re: Planning performance problem (67626.278ms)

2021-06-20 Thread Ranier Vilela
Em dom., 20 de jun. de 2021 às 14:50, Manuel Weitzman < manuelweitz...@gmail.com> escreveu: > Hello everyone, > > > Apparently, the planner isn't reusing the data boundaries across > alternative > > plans. It would be nicer if the planner remembered each column boundaries > > for later reuse (with

Re: Planning performance problem (67626.278ms)

2021-06-20 Thread Tom Lane
Manuel Weitzman writes: > I've written a very naive (and crappy) patch to show how adding > memorization to get_actual_variable_range() could help the planner on > scenarios with a big number of joins. So ... the reason why there's not caching of get_actual_variable_range results already is that

Re: Planning performance problem (67626.278ms)

2021-06-20 Thread Manuel Weitzman
Hello everyone, > Apparently, the planner isn't reusing the data boundaries across alternative > plans. It would be nicer if the planner remembered each column boundaries > for later reuse (within the same planner execution). I've written a very naive (and crappy) patch to show how adding memoriz